Hi *,
I've just started to play around with iText. My short-term goal is to convert
ASCII-files into PDF-files. As I'd like to keep the initial formatting, I chose
Courier as font and made every line of input into a "Paragraph"-object, after
stripping linebreaks (\r\n or \n). I'm doing fine with most of the input, but
the ASCII-data contains 0x0C (form feed) characters, too.
I've already created an empty paragraph
Font courier = FontFactory.getFont(FontFactory.COURIER, 10);
Paragraph emptyPara = new Paragraph("",courier);
which I also use as a replacement for input lines which only contain
linebreaks.
So at first I tried this after reading 0x0C chars:
int pageNumber = pdfDocument.getPageNumber();
while (pageNumber == pdfDocument.getPageNumber()) {
pdfDocument.add(emptyPara);
}
But this seems to be an endless loop; though I don't understand why.
Next I tried more or less the same thing with PageEvents, but this try did
just the same thing - falling into an (presumably) endless loop.
Any suggestions how to do this right?
Cheers,
Andreas
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions