Hello everyone,
I am trying to use iText to convert from pdf to text. However, when i try to
do it, none of the formatting is present. Basically, what i tried to do was
to get everything from PDF into a bytestream :
byte[] streamBytes = PdfReader.getStreamBytes(stream);
then used the PRTokenizer to tokenize the stream,
PRTokeniser tokenizer = new PRTokeniser(streamBytes);
FileOutputStream stream2=new
FileOutputStream("D:\\Workspace\\Test\\Output12.rtf");
if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
strbufe.append(tokenizer.getStringValue()}
I am able to get file as it was in the PDF except for the formatting.
Can you tell me, how can i retain the formatting. Its really urgent.
Thanks a lot in advance,
Abin Thomas
--
View this message in context:
http://www.nabble.com/how-to-get-formatting-from-pdf-tf4359588.html#a12424677
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/