Skip to content
Advertisement

Tag: itext7

Java iText scale document to A4

I have the following method that “resizes” all the pages of a document to A4 page dimensions: However , this is not working as expected , the pages are being transformed to A4 (297×210) BUT the content is not being fitted inside (scaled) , the content appears cutted because the original pages are larger than 297X210 . How can I

How to get page size of pdf document iText 7

I have a java program in iText 7 that receive JSON data and generate a PDF document (with header and footer) that works fine with data in variable clientData in comment, but when use the variable in no comments clientData doesn’t works, i’m getting this error java.lang.NullPointerException, the error appears when build the header and footer (in this line Rectangle

Using Single Template for all PDF Pages in IText 7

I have the following PDF template which should be consistent for all the pages that gets added in the PDF I am creating , The issue is that, am getting this template only for Page 1 and for rest of the pages only blank template is used , Here’s the code am using right now, I have referred this itextsharp

Is there any way to keep whitespaces before text in iText7?

I’ve added a Text object that start with whitespaces to the Paragraph object, but the whitespace of paragraph is removed in iText7(7.0.4). It looks like left trim. Is this a specification of Paragraph? Is there any way to keep whitespaces before text? Answer iText will trim spaces. But it will not remove non-breaking spaces.

Advertisement