The extra 2479 bytes extend the PDF providing some updated old object, some new objects, and a full cross reference table.
The initial 1019493 bytes constitute a valid PDF. The final version of the PDF you shared is not generated by iText, at least not by correct iText usage. My first guess would be another program postprocessing the PDF incorrectly but as it turned out the iText objects were closed incorrectly resulting in that error. Take the first 1019493 bytes of the file to get the original working file. Static Font namefont = FontFactory.getFont(calibriFont.toString(), 20, Font.BOLD, new BaseColor(139, 0, 0)) įontFactory.register(calibriFont.toString()) Īdditional data was added to the PDF after initial generation, introducing a cross reference error.
Here is the code that I have loaded the font in my PDF - static URL calibriFont = ("/static/fonts/Calibri Regular.ttf") I have also attached the screenshot of PDF in WPS office below. I have opened that PDF using Google Chrome, WPS office and other PDF Reader and that PDF is working perfectly fine but I can't seem to understand what is wrong when I am trying to view the PDF using Adobe.
All is working fine as I can view that PDF in my project and download also except that when I am trying to open the PDF using Adobe Reader, than the page is showing something like that. I have loaded that font from the src/resource/fonts folder as I am working with Boot. Want to batch process PDFs? Please read the related article here Batch process on PDFs in Adobe Acrobat.I am generating the PDF using iTextPdf version 5 and am using Calibri font inside that PDF. Hope it helps others, share your thoughts in the comments box, thank you ? That’s it, the newly saved PDF will be fully outlined. Now, save your new PDF wherever you need, to make it outlined. Go to the “ File” menu, click on “ Convert Text to Path”. I’m using an old version of Foxit PDF Editor but still a useful one. This method is just a matter of clicks to convert PDF text into outlines.
Method 2 – Convert PDF text into outlines or stroke with Foxit PDF Editor You can now open your PDF in (almost) any vector program without any missing fonts warning. Your PDF has been converted into outline. Again, make sure you have a backup as the changes you are going to make are irreversible. Select page range appropriately and click on the “ Apply” button. Tick mark both the options “ Convert All Text to Outlines” and “ Convert All Strokes to Outlines”. To do this, go to the “ Print Production” group from the same right side pane then click on the “ Flattener Preview” button.Ī new flattener dialog box opens. Next step is to flatten the transparencies. Then click the “ OK” button and save your PDF. Select “ Top” from the “ Vertical Distance” option at the bottom. Write simply a full stop or a comma in the first textbox.
Now click on the “ Watermark” option from the collapsed menu, then click “ Add Watermark”.Ī new Watermark dialog box opens. Go to the “ Tools” options at the right side pane.
The trick is to first insert transparent watermark and then flatten transparencies. Method 1 – Convert PDF text into outlines or stroke with Adobe AcrobatĪctually, this is a trick in Acrobat to convert PDF text into outlines. Sometimes things may go wrong as well, so please make a backup first. Please make a backup of your file before applying any method listed here.