I'm trying to use the getTextFromPage method on the PdfTextExtractor Class in iText-2.1.4.jar.
Here are my prototypes:
...and here's my logic:
When I try to compile, I'm getting:
*RNF5406 30 1 The call passed fewer parameters than the prototype indicates
are required.
*RNF7535 30 1 The type and attributes of the parameter do not match those
of the prototype.
...both pointing to the line in red above.
The documentation for the class shows this:
To me it looks like I have it defined correctly, so I can't figure out where these compile messages are coming from.
Any thoughts?
Here are my prototypes:
Code:
D PdfTextExtractor... D S O CLASS(*JAVA D :'com.lowagie.text.pdf- D .parser.PdfTextExtractor') D new_PdfTextExtractor... D PR like(PdfTextExtractor) D ExtProc(*JAVA D :'com.lowagie.text.pdf- D .parser.PdfTextExtractor' D :*CONSTRUCTOR) D inReader like(PdfReader) D PdfTextExtractor_getTextFromPage... D PR like(jString) D EXTPROC(*JAVA D :'com.lowagie.text.pdf- D .parser.PdfTextExtractor' D :'getTextFromPage') D argPageNbr like(jint) value
Code:
/free airDocument = AirPdf_newReader(%trim(#lcstmf)); airPages = Pdfreader_getNumberOfPages(airDocument); airExtractor = new_PdfTextExtractor(airDocument); airPage = 1; dow airPage <= airPages; [COLOR="red"]airString = PdfTextExtractor_getTextFromPage(airPage);[/COLOR] airBytes = String_getBytes(airString); #lcpage = airBytes; airPage = airPage + 1; enddo; Pdfreader_close(airDocument); // Clean Up freeLocalRef(airDocument); freeLocalRef(airExtractor); /end-free
*RNF5406 30 1 The call passed fewer parameters than the prototype indicates
are required.
*RNF7535 30 1 The type and attributes of the parameter do not match those
of the prototype.
...both pointing to the line in red above.
The documentation for the class shows this:
Code:
getTextFromPage public String getTextFromPage(int page) throws IOException Gets the text from a page. Parameters: page - the page number of the page Returns: a String with the content as plain text (without PDF syntax) Throws: IOException
Any thoughts?
Comment