Thanks Tilman, I'll try it
On 20 Dec 2017 09:16 -0300, Tilman Hausherr <[email protected]>, wrote: > Am 20.12.2017 um 12:20 schrieb Robson Peixoto: > > Hi guys, > > > > We are using PDFBox(1.x) and Itext(4.x) to split a PDF in multiples pages. > > The Itext has a very useful class, UnembedFontPdfSmartCopy, that "Makes a > > copy of a PDF, unembedding all embedded fonts. All font headers and > > descriptors are preserved and only the font file is removed." > > > > How can I do it using PDFBox? > > Any ideas? > > There is no such utility but yes it could be done, you'd have to access > the resources (sometimes recursively, e.g. forms and patterns), then the > fonts, then go through the font dictionaries (use PDFDebugger to see > their structure, there are different ones), then find /FontFile or > /FontFile2 or /FontFile3, and remove that entry. > > However this is something that is undesirable IMHO, and my help will be > minimal (I'll answer specific questions but won't write a full utility > for that). The resulting file might not always be displayed properly. > Embedding fonts is best practice, in PDF/A it is mandatory. > > Tilman > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >

