You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Alberto Sanmartin <al...@gmail.com> on 2016/12/14 19:04:24 UTC

Problem with two methods

Hello:

I am trying to create a program that converts information from my PDF bills to TXT, I have found and corrected internet code to perform this task but I still have two errors.

I leave here a photo with the error code in case someone could help me, the error appears in the functions getAllPages () and getPageFormat ().

A greeting and thanks in advance.

Alberto Sanmartin Martinez.


Re: Problem with two methods

Posted by Gilad Denneboom <gi...@gmail.com>.
This code was probably written for the 1.x versions of PDFBox. You are most
likely using the 2.x version, which is why some methods are no longer
working.

On Wed, Dec 14, 2016 at 8:04 PM, Alberto Sanmartin <
albertosanmartinmartinez@gmail.com> wrote:

> Hello:
>
> I am trying to create a program that converts information from my PDF
> bills to TXT, I have found and corrected internet code to perform this task
> but I still have two errors.
>
> I leave here a photo with the error code in case someone could help me,
> the error appears in the functions getAllPages () and getPageFormat ().
>
> A greeting and thanks in advance.
>
> Alberto Sanmartin Martinez.
>
>

Re: Problem with two methods

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 14.12.2016 um 20:04 schrieb Alberto Sanmartin:
> Hello:
> I am trying to create a program that converts information from my PDF 
> bills to TXT, I have found and corrected internet code to perform this 
> task but I still have two errors. I leave here a photo with the error 
> code in case someone could help me, the error appears in the functions 
> getAllPages () and getPageFormat ().
Don't bother with "internet code". Download the source code and look at 
the examples there. https://pdfbox.apache.org/download.cgi#20x 
Alternatively, this answer is good too: 
http://stackoverflow.com/a/38806828/535646 to set a specific page, do this:

|pdfStripper.setStartPage(1);pdfStripper.setEndPage(1);|

Tilman
> A greeting and thanks in advance.
> Alberto Sanmartin Martinez.