pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robson Peixoto <robsonpeix...@gmail.com>
Subject Re: Change PDF Font type
Date Wed, 20 Dec 2017 15:22:36 GMT
Thanks Tilman,

I'll try it

On 20 Dec 2017 09:16 -0300, Tilman Hausherr <THausherr@t-online.de>, 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: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message