You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Gordon Schneider <sc...@transampiping.com> on 2016/07/05 16:32:24 UTC

RE: ExtractImage TIFF

Thad

Thanks for that. I have downloaded the file into my server. But I am still having problems. I am not a java programmer. I use java standalone binaries like PDFBox as a tool to help with specific projects. I have used it for quite a while to Extract Text. We take the text files and process the data within with great success.

In this case I am trying to extract the TIFF image.

Currently I am trying to get it to work on my PC and not the server.

My java directory has the following files:

Directory of C:\java

2016-07-05  10:27 AM    <DIR>          .
2016-07-05  10:27 AM    <DIR>          ..
2016-06-30  07:44 AM         1,140,632 jai-imageio-1.1.jar
2016-06-16  12:55 PM            44,035 Maxfield.pdf
2016-06-09  03:04 PM         7,942,473 pdfbox-app-2.0.2.jar

Then I run the following to set my class path. 

set CLASSPATH=C:\java

Then I run the PDFBox command to the extract the TIFF image.  

java -jar pdfbox-app-2.0.2.jar ExtractImages Maxfield.pdf

This is what I get when I run the command.

Writing image: Maxfield-1
Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
SEVERE: No ImageWriter found for 'tiff' format
Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp jpeg JPEG

Why is not finding the jai-imageio-1.1.jar file? 

My guess it is something simple. I think my lack of understanding of Java is causing the problem.

Thanks

Gordon



-----Original Message-----
From: Thad Humphries [mailto:thad.humphries@gmail.com] 
Sent: June 29, 2016 7:26 AM
To: users@pdfbox.apache.org
Subject: Re: ExtractImage TIFF

http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/

On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 29.06.2016 um 00:29 schrieb Gordon Schneider:
>
>> Tilman
>>
>> Thanks for the quick response. I have tried a couple of times to find 
>> the jai_imageio.jar file to download to our server with no success. 
>> Where can you get this file to download?
>>
>
>
> https://stackoverflow.com/questions/7502181/where-can-i-download-jai-a
> nd-jai-imageio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>


--
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v. 121-24)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: ExtractImage TIFF

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 05.07.2016 um 19:19 schrieb Thad Humphries:
> Please anyone, chime in and correct me if necessary, but you may also need
> com.sun.media:jai-codec:1.1.3 from
> https://repository.jboss.org/nexus/content/repositories/thirdparty-releases

I never needed it. Only jai_imageio.jar.

>
> Where I am using jai-imageio for TIFFs, I'm also using the jai-codec.
>
> Since JAI has been pretty much orphaned, I'm been moving to Apache Commons
> Imaging to read and decompress TIFFs. I know that Commons Imaging is not
> complete, but so far it handles what I've needed. (However I've not yet
> seen how it works when I chain its output image to PDFBox's input.)

That project is sortof dormant, sadly. I like twelvemonkeys. Parts are 
already being used in PDFBox, and the project is active, and the main 
guys are great.

Tilman


> On Tue, Jul 5, 2016 at 1:09 PM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> Hi Gordon,
>>
>> You need to add the file to the classpath and make your call differently.
>> Here's what I do:
>>
>> copy all extra jar files to a lib subdirectory
>>
>> the call:
>>
>> java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -cp
>> "pdfbox-app-2.0.2.jar;lib/*" org.apache.pdfbox.tools.PDFBox ExtractImages
>> Maxfield.pdf
>>
>>
>> the "-D...." is for JDK8 and higher only. If you don't do it, PDFBox might
>> run slow.
>>
>> @Maruan: I wonder if we should explain this somehow somewhere.
>>
>> Tilman
>>
>>
>> Am 05.07.2016 um 18:32 schrieb Gordon Schneider:
>>
>>> Thad
>>>
>>> Thanks for that. I have downloaded the file into my server. But I am
>>> still having problems. I am not a java programmer. I use java standalone
>>> binaries like PDFBox as a tool to help with specific projects. I have used
>>> it for quite a while to Extract Text. We take the text files and process
>>> the data within with great success.
>>>
>>> In this case I am trying to extract the TIFF image.
>>>
>>> Currently I am trying to get it to work on my PC and not the server.
>>>
>>> My java directory has the following files:
>>>
>>> Directory of C:\java
>>>
>>> 2016-07-05  10:27 AM    <DIR>          .
>>> 2016-07-05  10:27 AM    <DIR>          ..
>>> 2016-06-30  07:44 AM         1,140,632 jai-imageio-1.1.jar
>>> 2016-06-16  12:55 PM            44,035 Maxfield.pdf
>>> 2016-06-09  03:04 PM         7,942,473 pdfbox-app-2.0.2.jar
>>>
>>> Then I run the following to set my class path.
>>>
>>> set CLASSPATH=C:\java
>>>
>>> Then I run the PDFBox command to the extract the TIFF image.
>>>
>>> java -jar pdfbox-app-2.0.2.jar ExtractImages Maxfield.pdf
>>>
>>> This is what I get when I run the command.
>>>
>>> Writing image: Maxfield-1
>>> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil
>>> writeImage
>>> SEVERE: No ImageWriter found for 'tiff' format
>>> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil
>>> writeImage
>>> SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp jpeg
>>> JPEG
>>>
>>> Why is not finding the jai-imageio-1.1.jar file?
>>>
>>> My guess it is something simple. I think my lack of understanding of Java
>>> is causing the problem.
>>>
>>> Thanks
>>>
>>> Gordon
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Thad Humphries [mailto:thad.humphries@gmail.com]
>>> Sent: June 29, 2016 7:26 AM
>>> To: users@pdfbox.apache.org
>>> Subject: Re: ExtractImage TIFF
>>>
>>> http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/
>>>
>>> On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr <TH...@t-online.de>
>>> wrote:
>>>
>>> Am 29.06.2016 um 00:29 schrieb Gordon Schneider:
>>>> Tilman
>>>>> Thanks for the quick response. I have tried a couple of times to find
>>>>> the jai_imageio.jar file to download to our server with no success.
>>>>> Where can you get this file to download?
>>>>>
>>>>>
>>>> https://stackoverflow.com/questions/7502181/where-can-i-download-jai-a
>>>> nd-jai-imageio
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>
>>>>
>>>>
>>> --
>>> "Hell hath no limits, nor is circumscrib'd In one self-place; but where
>>> we are is hell, And where hell is, there must we ever be" --Christopher
>>> Marlowe, *Doctor Faustus* (v. 121-24)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: ExtractImage TIFF

Posted by Thad Humphries <th...@gmail.com>.
Please anyone, chime in and correct me if necessary, but you may also need
com.sun.media:jai-codec:1.1.3 from
https://repository.jboss.org/nexus/content/repositories/thirdparty-releases

Where I am using jai-imageio for TIFFs, I'm also using the jai-codec.

Since JAI has been pretty much orphaned, I'm been moving to Apache Commons
Imaging to read and decompress TIFFs. I know that Commons Imaging is not
complete, but so far it handles what I've needed. (However I've not yet
seen how it works when I chain its output image to PDFBox's input.)

On Tue, Jul 5, 2016 at 1:09 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Hi Gordon,
>
> You need to add the file to the classpath and make your call differently.
> Here's what I do:
>
> copy all extra jar files to a lib subdirectory
>
> the call:
>
> java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -cp
> "pdfbox-app-2.0.2.jar;lib/*" org.apache.pdfbox.tools.PDFBox ExtractImages
> Maxfield.pdf
>
>
> the "-D...." is for JDK8 and higher only. If you don't do it, PDFBox might
> run slow.
>
> @Maruan: I wonder if we should explain this somehow somewhere.
>
> Tilman
>
>
> Am 05.07.2016 um 18:32 schrieb Gordon Schneider:
>
>> Thad
>>
>> Thanks for that. I have downloaded the file into my server. But I am
>> still having problems. I am not a java programmer. I use java standalone
>> binaries like PDFBox as a tool to help with specific projects. I have used
>> it for quite a while to Extract Text. We take the text files and process
>> the data within with great success.
>>
>> In this case I am trying to extract the TIFF image.
>>
>> Currently I am trying to get it to work on my PC and not the server.
>>
>> My java directory has the following files:
>>
>> Directory of C:\java
>>
>> 2016-07-05  10:27 AM    <DIR>          .
>> 2016-07-05  10:27 AM    <DIR>          ..
>> 2016-06-30  07:44 AM         1,140,632 jai-imageio-1.1.jar
>> 2016-06-16  12:55 PM            44,035 Maxfield.pdf
>> 2016-06-09  03:04 PM         7,942,473 pdfbox-app-2.0.2.jar
>>
>> Then I run the following to set my class path.
>>
>> set CLASSPATH=C:\java
>>
>> Then I run the PDFBox command to the extract the TIFF image.
>>
>> java -jar pdfbox-app-2.0.2.jar ExtractImages Maxfield.pdf
>>
>> This is what I get when I run the command.
>>
>> Writing image: Maxfield-1
>> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil
>> writeImage
>> SEVERE: No ImageWriter found for 'tiff' format
>> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil
>> writeImage
>> SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp jpeg
>> JPEG
>>
>> Why is not finding the jai-imageio-1.1.jar file?
>>
>> My guess it is something simple. I think my lack of understanding of Java
>> is causing the problem.
>>
>> Thanks
>>
>> Gordon
>>
>>
>>
>> -----Original Message-----
>> From: Thad Humphries [mailto:thad.humphries@gmail.com]
>> Sent: June 29, 2016 7:26 AM
>> To: users@pdfbox.apache.org
>> Subject: Re: ExtractImage TIFF
>>
>> http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/
>>
>> On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr <TH...@t-online.de>
>> wrote:
>>
>> Am 29.06.2016 um 00:29 schrieb Gordon Schneider:
>>>
>>> Tilman
>>>>
>>>> Thanks for the quick response. I have tried a couple of times to find
>>>> the jai_imageio.jar file to download to our server with no success.
>>>> Where can you get this file to download?
>>>>
>>>>
>>> https://stackoverflow.com/questions/7502181/where-can-i-download-jai-a
>>> nd-jai-imageio
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>>
>>>
>> --
>> "Hell hath no limits, nor is circumscrib'd In one self-place; but where
>> we are is hell, And where hell is, there must we ever be" --Christopher
>> Marlowe, *Doctor Faustus* (v. 121-24)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)

RE: ExtractImage TIFF

Posted by Gordon Schneider <sc...@transampiping.com>.
Tilman

I have this working on my computer. The next step is for me to get it working when running the command on our power server.

Thanks

Gord


-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: July 5, 2016 11:09 AM
To: users@pdfbox.apache.org
Subject: Re: ExtractImage TIFF

Hi Gordon,

You need to add the file to the classpath and make your call differently. Here's what I do:

copy all extra jar files to a lib subdirectory

the call:

java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -cp "pdfbox-app-2.0.2.jar;lib/*" org.apache.pdfbox.tools.PDFBox ExtractImages Maxfield.pdf


the "-D...." is for JDK8 and higher only. If you don't do it, PDFBox might run slow.

@Maruan: I wonder if we should explain this somehow somewhere.

Tilman

Am 05.07.2016 um 18:32 schrieb Gordon Schneider:
> Thad
>
> Thanks for that. I have downloaded the file into my server. But I am still having problems. I am not a java programmer. I use java standalone binaries like PDFBox as a tool to help with specific projects. I have used it for quite a while to Extract Text. We take the text files and process the data within with great success.
>
> In this case I am trying to extract the TIFF image.
>
> Currently I am trying to get it to work on my PC and not the server.
>
> My java directory has the following files:
>
> Directory of C:\java
>
> 2016-07-05  10:27 AM    <DIR>          .
> 2016-07-05  10:27 AM    <DIR>          ..
> 2016-06-30  07:44 AM         1,140,632 jai-imageio-1.1.jar
> 2016-06-16  12:55 PM            44,035 Maxfield.pdf
> 2016-06-09  03:04 PM         7,942,473 pdfbox-app-2.0.2.jar
>
> Then I run the following to set my class path.
>
> set CLASSPATH=C:\java
>
> Then I run the PDFBox command to the extract the TIFF image.
>
> java -jar pdfbox-app-2.0.2.jar ExtractImages Maxfield.pdf
>
> This is what I get when I run the command.
>
> Writing image: Maxfield-1
> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil 
> writeImage
> SEVERE: No ImageWriter found for 'tiff' format Jul 05, 2016 10:18:46 
> AM org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
> SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp 
> jpeg JPEG
>
> Why is not finding the jai-imageio-1.1.jar file?
>
> My guess it is something simple. I think my lack of understanding of Java is causing the problem.
>
> Thanks
>
> Gordon
>
>
>
> -----Original Message-----
> From: Thad Humphries [mailto:thad.humphries@gmail.com]
> Sent: June 29, 2016 7:26 AM
> To: users@pdfbox.apache.org
> Subject: Re: ExtractImage TIFF
>
> http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/
>
> On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr 
> <TH...@t-online.de>
> wrote:
>
>> Am 29.06.2016 um 00:29 schrieb Gordon Schneider:
>>
>>> Tilman
>>>
>>> Thanks for the quick response. I have tried a couple of times to 
>>> find the jai_imageio.jar file to download to our server with no success.
>>> Where can you get this file to download?
>>>
>>
>> https://stackoverflow.com/questions/7502181/where-can-i-download-jai-
>> a
>> nd-jai-imageio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>
> --
> "Hell hath no limits, nor is circumscrib'd In one self-place; but 
> where we are is hell, And where hell is, there must we ever be" 
> --Christopher Marlowe, *Doctor Faustus* (v. 121-24)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: ExtractImage TIFF

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi Gordon,

You need to add the file to the classpath and make your call 
differently. Here's what I do:

copy all extra jar files to a lib subdirectory

the call:

java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -cp 
"pdfbox-app-2.0.2.jar;lib/*" org.apache.pdfbox.tools.PDFBox 
ExtractImages Maxfield.pdf


the "-D...." is for JDK8 and higher only. If you don't do it, PDFBox 
might run slow.

@Maruan: I wonder if we should explain this somehow somewhere.

Tilman

Am 05.07.2016 um 18:32 schrieb Gordon Schneider:
> Thad
>
> Thanks for that. I have downloaded the file into my server. But I am still having problems. I am not a java programmer. I use java standalone binaries like PDFBox as a tool to help with specific projects. I have used it for quite a while to Extract Text. We take the text files and process the data within with great success.
>
> In this case I am trying to extract the TIFF image.
>
> Currently I am trying to get it to work on my PC and not the server.
>
> My java directory has the following files:
>
> Directory of C:\java
>
> 2016-07-05  10:27 AM    <DIR>          .
> 2016-07-05  10:27 AM    <DIR>          ..
> 2016-06-30  07:44 AM         1,140,632 jai-imageio-1.1.jar
> 2016-06-16  12:55 PM            44,035 Maxfield.pdf
> 2016-06-09  03:04 PM         7,942,473 pdfbox-app-2.0.2.jar
>
> Then I run the following to set my class path.
>
> set CLASSPATH=C:\java
>
> Then I run the PDFBox command to the extract the TIFF image.
>
> java -jar pdfbox-app-2.0.2.jar ExtractImages Maxfield.pdf
>
> This is what I get when I run the command.
>
> Writing image: Maxfield-1
> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
> SEVERE: No ImageWriter found for 'tiff' format
> Jul 05, 2016 10:18:46 AM org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
> SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp jpeg JPEG
>
> Why is not finding the jai-imageio-1.1.jar file?
>
> My guess it is something simple. I think my lack of understanding of Java is causing the problem.
>
> Thanks
>
> Gordon
>
>
>
> -----Original Message-----
> From: Thad Humphries [mailto:thad.humphries@gmail.com]
> Sent: June 29, 2016 7:26 AM
> To: users@pdfbox.apache.org
> Subject: Re: ExtractImage TIFF
>
> http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/
>
> On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> Am 29.06.2016 um 00:29 schrieb Gordon Schneider:
>>
>>> Tilman
>>>
>>> Thanks for the quick response. I have tried a couple of times to find
>>> the jai_imageio.jar file to download to our server with no success.
>>> Where can you get this file to download?
>>>
>>
>> https://stackoverflow.com/questions/7502181/where-can-i-download-jai-a
>> nd-jai-imageio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>
> --
> "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v. 121-24)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org