Manipulate paths, color etc. in iText

Now, what’s the way to go with manipulating things and writing them back to the PDF? Do I have to construct an entirely new PDF document and copy everything over (in manipulated form), or can I somehow manipulate the read PDF data directly? In essence you are looking for a class which is not merely … Read more

iText 5 HTML+CSS to PDF/A-2 : Helvetica font not embedded error

We are using our very own PrintFontProvider. This should get you going: private static final CSSResolver cssResolver = XMLWorkerHelper.getInstance().getDefaultCssResolver(true); private static final HtmlPipelineContext htmlContext = new HtmlPipelineContext(null); static { htmlContext.setTagFactory(Tags.getHtmlTagProcessorFactory()); htmlContext.autoBookmark(false); // Our own PrintFontProvider provides Fonts as needed… htmlContext.setCssAppliers(new CssAppliersImpl(new PrintFontProvider())); // We apply some default styles to the pdf generation… try { String … Read more

How to fit a String inside a rectangle?

There are three options: Either you provide a bigger rectangle, so that the content fits inside, or you reduce the content (e.g. smaller font, less text),… Keep the size of the rectangle, keep the font size, etc… but add the content that doesn’t fit on the next page. How do you know if the content … Read more