× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Kristen was a great help. Learned a few things which is always a good thing.

The next step is to extract text from the image extracted. I have done some preliminary work on it. Will try to see if tesseract OCR will work for us.

Thanks

Gordon

On Jul 19, 2016, at 11:00 AM, java400-l-request@xxxxxxxxxxxx wrote:

Send JAVA400-L mailing list submissions to
java400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/java400-l
or, via email, send a message with subject or body 'help' to
java400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
java400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of JAVA400-L digest..."


Today's Topics:

1. RE: JAVA400-L Digest, Vol 14, Issue 36 (Kristen Henry)


----------------------------------------------------------------------

message: 1
date: Mon, 18 Jul 2016 17:40:44 -0600
from: "Kristen Henry" <klhnry@xxxxxxxxxxxx>
subject: RE: JAVA400-L Digest, Vol 14, Issue 36

Hi,

Gordon and I met, and by testing in Qshell I was able to get the Java
command working by adding the path ""/java/PDFBox/" to the classpath and to
the other files, and by changing the semi colon to a colon in the Classpath.
It could be run in place if you cd to the /java/PDFBox directory, but by
adding the path the class can be run in other commands or apps.

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

Success!

Kristen




-----Original Message-----
From: JAVA400-L [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kristen
Henry
Sent: Monday, July 18, 2016 10:03 AM
To: 'Java Programming on and around the IBM i'
Subject: RE: JAVA400-L Digest, Vol 14, Issue 36

Hi,

I will work with you on this some more offline and report back here.

Kristen



-----Original Message-----
From: JAVA400-L [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gordon
Schneider
Sent: Friday, July 15, 2016 3:09 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: JAVA400-L Digest, Vol 14, Issue 36

Here is my CL program.

PGM

ADDENVVAR ENVVAR(CLASSPATH) +
VALUE('/java/PDFBox/pdfbox-app-2.0.2.jar:/java/PDF+
Box/lib/jai-imageio-1.1.jar') LEVEL(*JOB) +
REPLACE(*YES)
ADDENVVAR ENVVAR(JAVA_HOME) +
VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit'+
) REPLACE(*YES)
JAVA CLASS('/java/PDFBox/pdfbox-app-2.0.2.jar') + PARM(ExtractImages
'/Gord/PDF/Maxfield EFT.pdf') ENDPGM

I get the same messages when I ran it on as its own as a Java command.

Writing image: /Gord/PDF/Maxfield EFT-1 Jul 15, 2016 2:49:21 PM
org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
SEVERE: No ImageWriter found for 'tiff' format Jul 15, 2016 2:49:21 PM
org.apache.pdfbox.tools.imageio.ImageIOUtil writeImage
SEVERE: Supported formats: JPG jpg bmp BMP gif GIF WBMP png PNG wbmp jpeg
JPEG Java program completed

So I am no worse off. Still have more to learn.

What else do I need to do to get it working?

Thanks

Gord



----- Original Message -----

From: java400-l-request@xxxxxxxxxxxx
To: java400-l@xxxxxxxxxxxx
Sent: Friday, July 15, 2016 11:00:01 AM
Subject: JAVA400-L Digest, Vol 14, Issue 36

Send JAVA400-L mailing list submissions to java400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/java400-l
or, via email, send a message with subject or body 'help' to
java400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at java400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific than
"Re: Contents of JAVA400-L digest..."


Today's Topics:

1. Issue with Classpath and Java on IBM i 7.1 (Gordon Schneider) 2. Re:
Issue with Classpath and Java on IBM i 7.1 (Kristen Henry)


----------------------------------------------------------------------

message: 1
date: Thu, 14 Jul 2016 18:41:55 -0600
from: Gordon Schneider <gordon.schneider@xxxxxxx>
subject: Issue with Classpath and Java on IBM i 7.1

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:
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@xxxxxxxxx
<mailto:thad.humphries@xxxxxxxxx>]
Sent: June 29, 2016 7:26 AM
To: users@xxxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxxx>
Subject: Re: ExtractImage TIFF

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

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 success.

Where can you get this file to download?


https://stackoverflow.com/questions/7502181/where-can-i-download-jai-
<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

------------------------------

message: 2
date: Thu, 14 Jul 2016 19:11:43 -0600
from: Kristen Henry <klhnry@xxxxxxxxxxxx>
subject: Re: Issue with Classpath and Java on IBM i 7.1

In my opinion, there are several questions to be asked, and some concepts
you need to learn.

How are you calling the program that is failing now?

When it is called by the MCF job how will it be called?

I suggest setting up the environment from within a clp program, then
calling the Java program in the clp. It will need both the classpath and
a path set up.

Kristen

On Jul 14, 2016 6:44 PM, "Gordon Schneider" <gordon.schneider@xxxxxxx>
wrote:

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:
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@xxxxxxxxx <mailto:
thad.humphries@xxxxxxxxx>]
Sent: June 29, 2016 7:26 AM
To: users@xxxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxxx>
Subject: Re: ExtractImage TIFF

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

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
success.
Where can you get this file to download?


https://stackoverflow.com/questions/7502181/where-can-i-download-jai- <

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.




------------------------------

Subject: Digest Footer

--
This is the Java Programming on and around the IBM i (JAVA400-L) digest 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.



------------------------------

End of JAVA400-L Digest, Vol 14, Issue 36
*****************************************

--
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.

--
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.



------------------------------

Subject: Digest Footer

--
This is the Java Programming on and around the IBM i (JAVA400-L) digest 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.



------------------------------

End of JAVA400-L Digest, Vol 14, Issue 40
*****************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.