Paulo Soares wrote:
> You need some other program to extract the text.

That's true; however I have the impression the PDF the OP is
talking about is generated in an automated process. If a tool
similar to iText is used, it might be possible to use a hack
to find out the specific String.

You could try something like this:

byte[] streamBytes = reader.getPageContent(1);
String contentStream = new String(streamBytes);
int pos = contentStream.indexOf("XXXX-XXXX-") + 11;
String name = contentStream.substring(pos, pos + 10));

Of course: if "XXXX-XXXX-" isn't a String recurring
on every page, you'll have a hard time finding the rest
of the String. Also, it heavily depends on the tool
that was used to create the original PDF document
whether or not this hack will work.

Note that I generally don't advise workarounds like
this, because they aren't always waterproof.

br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to