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/03/18 17:38:16 UTC

ExtractText command line OPTIONS

We have used this very successfully for a number of months with versions 2.0.0-RC2 and RC3.

Here is an example of how we use it.

JAVA CLASS('/java/PDFBox/pdfbox-app-2.0.0.jar') PARM(ExtractText '/Gord/PDF/Vendor Invoice.pdf' '/Gord/PDF/Vendor Invoice.txt')

I was reviewing the documentation for the ExtractText.

java -jar pdfbox-app-x.y.z.jar ExtractText [OPTIONS] <inputfile> [Text file]

I noticed the OPTIONS part that comes before the input file. I am interested in seeing what the -sort option does. I noticed that the default is false.

-sort

 false

   Sort the text before writing.


To see any difference from the results we are currently getting I need to add the -sort option and set it to true.

JAVA CLASS('/java/PDFBox/pdfbox-app-2.0.0.jar') PARM(ExtractText '-sort:true' '/Gord/PDF/Vendor Invoice.pdf' '/Gord/PDF/Vendor Invoice.txt')

The command above is what I tried to run. I always get a FileNot Found Exception. The only way I get it to work at all is to remove the ":true" part from the command. This would mean it is still running with the sort option as false. So in other words I will never see anything different.

What is the proper away to add the -sort option to the command. I have looked at lots of different things to figure this out without any success.

Thanks for your help in advance.

Gordon Schneider
403-236-0601
Trans Am Piping Products Ltd.


RE: ExtractText command line OPTIONS

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

My assumption was obviously wrong. It works now. It did make a big difference to the order of the text in the resulting file. It will be easier to work with.

Thanks

Gord
 

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: March 18, 2016 12:40 PM
To: users@pdfbox.apache.org
Subject: Re: ExtractText command line OPTIONS

Am 18.03.2016 um 17:38 schrieb Gordon Schneider:
> What is the proper away to add the -sort option to the command. I have looked at lots of different things to figure this out without any success.

just use

-sort



---------------------------------------------------------------------
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: ExtractText command line OPTIONS

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 18.03.2016 um 17:38 schrieb Gordon Schneider:
> What is the proper away to add the -sort option to the command. I have looked at lots of different things to figure this out without any success.

just use

-sort



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