Am 12.01.2016 um 18:35 schrieb Romina O. Leon:
Prior to PDFBox 2.0 parsing the page content was done using
PDStream contents = page.getContents();PDFStreamParser parser = new
PDFStreamParser(contents.getStream());parser.parse();List<Object>
tokens = parser.getTokens();
But, the method getContents() from the PDPage Class returns an InputStream,
which it can't be cast to a PDStream.
And with the example below:
With PDFBox 2.0 the code is reduced to
PDFStreamParser parser = new
PDFStreamParser(page);parser.parse();List<Object> tokens =
parser.getTokens();
I still can't get the page content!
What do you mean, getting the page contents? You mention getContents(),
this returns an inputStream that you can read. Getting the tokens is
shown in the example you quote. Why do you insist on a PDStream?
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]