Hi,
I verified the pom and it ended up being a silly thing:

<scope>test</scope>

After I remove this from all jai dependencies

I get what it is supposed...

[JPG, JPEG 2000, tiff, bmp, PCX, gif, WBMP, PNG, RAW, JPEG, PNM, tif, TIFF,
jpeg, wbmp, jbig2, jpg, JPEG2000, BMP, pcx, GIF, png, raw, JBIG2, pnm, TIF,
jpeg2000, jpeg 2000]

It was my fault. I just copied the dependencies from
https://svn.apache.org/viewvc/pdfbox/trunk/parent/pom.xml?view=markup and
forgot to remove the scope. I am sorry. Thank you all for your help.

Best regards.

Jorge Flórez

2017-02-28 13:45 GMT-05:00 Tilman Hausherr <thaush...@t-online.de>:

> Am 28.02.2017 um 19:23 schrieb jorgeeflorez .:
>
>> Hi Tilman,
>>
>> this is what I get:
>>
>> [JPG, jpg, bmp, BMP, gif, GIF, WBMP, png, PNG, wbmp, jpeg, JPEG]
>>
>
> Then it's really not there... JBIG2 is also missing. I'd suspect some
> problem with your build... try
> - do a clean build
> - verify that your pom is ok re: syntax
> - run the tool both in and outside of your IDE
> - have a look what is in your manifest / in your class path, i.e. what is
> really there? Look in the directories. You can look at jar files with any
> zip tool, e.g. 7zip.
> - post the fill pom file.
>
> Tilman
>
>
>
>
>>
>> 2017-02-28 13:04 GMT-05:00 Tilman Hausherr <thaush...@t-online.de>:
>>
>> Am 28.02.2017 um 18:56 schrieb jorgeeflorez .:
>>>
>>> Hi Maruan,
>>>>
>>>> thank you for your reply. Yes, I already had a look at that page, from
>>>> that
>>>> I took the dependencies I put in the pom I showed in my mail.
>>>>
>>>> I am getting the error even when the suggested dependencies are set.
>>>>
>>>> It's very weird, I use the same dependencies and it works.
>>>
>>> Please include
>>>
>>> |System.out.println(Arrays.toString(ImageIO.getReaderFormatNa‌​mes()));|
>>>
>>> in your code at the start, what do you get?
>>>
>>> Tilman
>>>
>>>
>>>
>>>
>>> Regards.
>>>>
>>>> Jorge Flórez
>>>>
>>>> 2017-02-28 11:43 GMT-05:00 Maruan Sahyoun <sahy...@fileaffairs.de>:
>>>>
>>>> Hi,
>>>>
>>>>> please take a lookt at https://pdfbox.apache.org/2.0/dependencies.html
>>>>> under Optional Components/JAI Image I/O
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> Best regards
>>>>>
>>>>> Maruan
>>>>>
>>>>>
>>>>> Am 28.02.2017 um 17:19 schrieb jorgeeflorez . <
>>>>> jorgeeduardoflo...@gmail.com>:
>>>>>
>>>>> Hi all,
>>>>>>
>>>>>> I am getting some errors with version 2.0.4. In a small maven project
>>>>>> I
>>>>>>
>>>>>> set
>>>>>
>>>>> up, when I try to render a page from a PDF file, I get this in console:
>>>>>>
>>>>>> ERROR [main] (PDFStreamEngine.java:866) - Cannot read JPEG2000 image:
>>>>>>
>>>>>> Java
>>>>>
>>>>> Advanced Imaging (JAI) Image I/O Tools are not installed
>>>>>>
>>>>>> This is the pom for the project:
>>>>>>      <properties>
>>>>>>          <project.build.sourceEncoding>UTF-8</project.build.
>>>>>>
>>>>>> sourceEncoding>
>>>>>
>>>>>          <maven.compiler.source>1.8</maven.compiler.source>
>>>>>>          <maven.compiler.target>1.8</maven.compiler.target>
>>>>>>      </properties>
>>>>>>      <dependencies>
>>>>>>          <dependency>
>>>>>>              <groupId>org.apache.pdfbox</groupId>
>>>>>>              <artifactId>pdfbox</artifactId>
>>>>>>              <version>2.0.4</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>org.apache.pdfbox</groupId>
>>>>>>              <artifactId>pdfbox-tools</artifactId>
>>>>>>              <version>2.0.4</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>junit</groupId>
>>>>>>              <artifactId>junit</artifactId>
>>>>>>              <version>4.12</version>
>>>>>>              <scope>test</scope>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>commons-logging</groupId>
>>>>>>              <artifactId>commons-logging</artifactId>
>>>>>>              <version>1.2</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>commons-io</groupId>
>>>>>>              <artifactId>commons-io</artifactId>
>>>>>>              <version>2.4</version>
>>>>>>              <scope>test</scope>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>org.bouncycastle</groupId>
>>>>>>              <artifactId>bcprov-jdk15on</artifactId>
>>>>>>              <version>1.55</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>org.bouncycastle</groupId>
>>>>>>              <artifactId>bcmail-jdk15on</artifactId>
>>>>>>              <version>1.55</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>org.bouncycastle</groupId>
>>>>>>              <artifactId>bcpkix-jdk15on</artifactId>
>>>>>>              <version>1.55</version>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>log4j</groupId>
>>>>>>              <artifactId>log4j</artifactId>
>>>>>>              <version>1.2.17</version>
>>>>>>          </dependency>
>>>>>>
>>>>>>          <dependency>
>>>>>>              <groupId>com.levigo.jbig2</groupId>
>>>>>>              <artifactId>levigo-jbig2-imageio</artifactId>
>>>>>>              <version>1.6.5</version>
>>>>>>              <scope>test</scope>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>com.github.jai-imageio</groupId>
>>>>>>              <artifactId>jai-imageio-core</artifactId>
>>>>>>              <version>1.3.1</version>
>>>>>>              <scope>test</scope>
>>>>>>          </dependency>
>>>>>>          <dependency>
>>>>>>              <groupId>com.github.jai-imageio</groupId>
>>>>>>              <artifactId>jai-imageio-jpeg2000</artifactId>
>>>>>>              <version>1.3.0</version>
>>>>>>              <scope>test</scope>
>>>>>>          </dependency>
>>>>>>      </dependencies>
>>>>>>
>>>>>> I added the dependencies you suggest (I think) in
>>>>>> https://pdfbox.apache.org/2.0/dependencies.html.
>>>>>>
>>>>>> After some debugging I came up with this stack trace:
>>>>>>
>>>>>> org.apache.pdfbox.filter.MissingImageReaderException: Cannot read
>>>>>>
>>>>>> JPEG2000
>>>>>
>>>>> image: Java Advanced Imaging (JAI) Image I/O Tools are not installed
>>>>>>      at org.apache.pdfbox.filter.Filter.findImageReader(Filter.java:
>>>>>> 128)
>>>>>>      at org.apache.pdfbox.filter.JPXFilter.readJPX(JPXFilter.java:87)
>>>>>>      at org.apache.pdfbox.filter.JPXFilter.decode(JPXFilter.java:57)
>>>>>>      at org.apache.pdfbox.cos.COSInputStream.create(
>>>>>>
>>>>>> COSInputStream.java:69)
>>>>>
>>>>>      at org.apache.pdfbox.cos.COSStream.createInputStream(
>>>>>>
>>>>>> COSStream.java:162)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.
>>>>>>
>>>>>> java:235)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.
>>>>>>
>>>>>> <init>(PDImageXObject.java:160)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.pdmodel.graphics.PDXObject.
>>>>>>
>>>>>> createXObject(PDXObject.java:70)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.pdmodel.PDResources.getXObject(PDResources
>>>>>> .java:409)
>>>>>>      at
>>>>>> org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(
>>>>>>
>>>>>> DrawObject.java:53)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(
>>>>>>
>>>>>> PDFStreamEngine.java:829)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.contentstream.PDFStreamEngine.processStrea
>>>>>> mOperators(
>>>>>>
>>>>>> PDFStreamEngine.java:486)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.contentstream.PDFStreamEngine.
>>>>>>
>>>>>> processStream(PDFStreamEngine.java:460)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.contentstream.PDFStreamEngine.
>>>>>>
>>>>>> processPage(PDFStreamEngine.java:150)
>>>>>
>>>>>      at org.apache.pdfbox.rendering.PageDrawer.drawPage(
>>>>>>
>>>>>> PageDrawer.java:189)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.rendering.PDFRenderer.renderImage(
>>>>>>
>>>>>> PDFRenderer.java:145)
>>>>>
>>>>>      at
>>>>>> org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(
>>>>>>
>>>>>> PDFRenderer.java:94)
>>>>>
>>>>> It is trying to get a reader for "JPEG2000" and can't find it. Am I
>>>>>>
>>>>>> missing
>>>>>
>>>>> something to make it work? or should I think that the pdf file has some
>>>>>> "unusual" image inside it?
>>>>>>
>>>>>> Thanks in advance for your help.
>>>>>>
>>>>>> Best Regards.
>>>>>>
>>>>>> Jorge Flórez
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
>>>>> For additional commands, e-mail: users-h...@pdfbox.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
>
>

Reply via email to