I am using this code to generate a PDF from HTML String.
ITextRenderer renderer = new ITextRenderer();
renderer.setDocumentFromString(new String(htmlString.getBytes("UTF-8")));
In table some row contains data of a very large length.Due to which the text is overflowing the PDF.I have used Word Wrap in HTML.But this is not working in PDF generated by the code. I want to know if there is any alternative in IText 2 to Word Wrap?
Or can i generate my PDF in Landscape Mode so that i could display the whole data in PDF.
Any suggestion is welcomed.
I have attached one image at following URL. http://www.mediafire.com/download/l19qa33myluaqj4/pw-4_(2).jpg
You can set your page in landscape mode using CSS, using:
@page { size: A4 landscape;}
The page size is part of CSS 3 specification, and is supported by flying saucer.
I got the answer as suggested by @Bruno Lowagie
We can set our page in landscape mode using CSS, using:
@page { size: A4 landscape;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With