5

If I execute this method

tiff = TiffImage.getTiffImage(rafa,i,false); 

Then it's through the below exception.
Can anyone give me any solution for this exception?

Exception Stack Trace:
    java.lang.IllegalArgumentException: Extra samples are not supported.
      at com.lowagie.text.pdf.codec.TiffImage.getTiffImageColor(Unknown Source)
      at com.lowagie.text.pdf.codec.TiffImage.getTiffImage
moffeltje
  • 4,521
  • 4
  • 33
  • 57
user5093084
  • 51
  • 1
  • 3

1 Answers1

2

If you're using com.lowagie, you must be using version 2.1.7 or earlier (thanks Amedee Van Gasse). iText didn't support TIFF's "extra samples" until v5.0.5 (released Nov 2nd, 2010). Using v5.0.5 or newer should work. Of course, v5 and up use the AGPL rather than the MPL/LGPL which means some projects can't use them...

Community
  • 1
  • 1
T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
  • The OP is using `com.lowagie`, which is version `2.1.7` or older, which would indeed not have that newer functionality. As far as the AGPL goes, that is not a technical matter, and StackOverflow moderators have been known to close non-technical questions. – Amedee Van Gasse Jan 14 '16 at 19:46
  • @AmedeeVanGasse: Not sure what you're trying to say there (other than the version thing, thanks). This answer is answering the question of the error message. The answer is "It's supported in the v5 version" (I've just updated to say more clearly that it's not supported previously, but although the error says that itself). I flagged up the license thing as a side note in case it was relevant to the OP or anytone else finding the answer. – T.J. Crowder Jan 15 '16 at 07:28