|
I am trying to get PDFBox from apache.org <http://apache.org/> to run
with a TIFF image extraction jar file from another organization. It is
supposed to work with PDFBox. I got it to work on my computer which is a
Windows 10 machine.
The next section here is my back and forth e-mail to get it to work on my
Windows machine. After that I will show what I have done on my power server
to get it to run there as the intention is this will run within a
GoAnywhere MFT (Managed File Transfer) project.
Here is my conversation with apache.org <http://apache.org/>
-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@xxxxxxxxxxx <mailto:
THausherr@xxxxxxxxxxx>]
Sent: July 5, 2016 11:09 AM
To: users@xxxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxxx>
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:
Thadstill having problems. I am not a java programmer. I use java standalone
Thanks for that. I have downloaded the file into my server. But I am
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.
Java is causing the problem.
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
thad.humphries@xxxxxxxxx>]
Thanks
Gordon
-----Original Message-----
From: Thad Humphries [mailto:thad.humphries@xxxxxxxxx <mailto:
Sent: June 29, 2016 7:26 AMhttp://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/>
To: users@xxxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxxx>
Subject: Re: ExtractImage TIFF
http://logicaldoc.sourceforge.net/maven/javax/media/jai-imageio/1.1/ <
success.
On Wed, Jun 29, 2016 at 1:21 AM, Tilman Hausherr
<THausherr@xxxxxxxxxxx <mailto:THausherr@xxxxxxxxxxx>>
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
https://stackoverflow.com/questions/7502181/where-can-i-download-jai->Where can you get this file to download?
https://stackoverflow.com/questions/7502181/where-can-i-download-jai- <
a
nd-jai-imageio
Here is the file structure for the jar files on my power server.
X:\java\pdfbox>dir *
Volume in drive X has no label.
Directory of X:\java\pdfbox
2016-07-06 08:42 AM <DIR> .
2016-06-16 02:00 PM <DIR> ..
2016-03-18 09:40 AM 7,952,655 pdfbox-app-2.0.0.jar
2015-11-23 03:14 PM 7,906,925 pdfbox-app-2.0.0-RC2.jar
2016-04-26 08:10 AM 7,955,872 pdfbox-app-2.0.1.jar
2016-02-04 10:18 AM 7,945,451 pdfbox-app-2.0.0-RC3.jar
2016-06-09 03:04 PM 7,942,473 pdfbox-app-2.0.2.jar
2016-06-16 12:55 PM 44,035 Maxfield.pdf
2016-07-06 08:42 AM <DIR> lib
X:\java\pdfbox\lib>dir
Volume in drive X has no label.
Directory of X:\java\pdfbox\lib
2016-07-06 08:42 AM <DIR> .
2016-07-06 08:42 AM <DIR> ..
2016-06-30 07:44 AM 1,140,632 jai-imageio-1.1.jar
Here is the CLASSPATH I set up.
Display Environment Var (*JOB)
Name . . . . . . . . . : CLASSPATH
Value . . . . . . . . . : '/java/PDFBox/lib/jai-iamgeio-1.1.jar'
Here is the command I run to extract the tiff image from the PDF file
Run Java Program (JAVA)
Type choices, press Enter.
Class file or JAR file . . . . . > '/java/PDFBox/pdfbox-app-2.0.2.jar'
Parameters . . . . . . . . . . . > ExtractImages
+ for more values > '/java/PDFBox/Maxfield.pdf'
Classpath . . . . . . . . . . . *ENVVAR
This is what I get when I run the command.
Writing image: /java/PDFBox/Maxfield-1
Jul 14, 2016 3:42:32 PM org.apache.pdfbox.tools.imageio.ImageIOUtil
writeImage
SEVERE: No ImageWriter found for 'tiff' format
Jul 14, 2016 3:42:32 PM org.apache.pdfbox.tools.imageio.ImageIOUtil
writeImage
SEVERE: Supported formats: jpg JPG GIF gif BMP bmp jpeg JPEG PNG png WBMP
wbmp
Java program completed
So for some reason it is not finding the
/java/PDFBox/lib/jai-iamgeio-1.1.jar file.
What am I doing wrong?
Thanks in advance.
Gordon Schneider
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.