pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: Embed font's without writing Text (providing unembeded fonts)
Date Fri, 11 Dec 2015 18:11:03 GMT

One trick for embedding missing fonts would be to create a new PDFont using a method such
as PDTrueTypeFont.load and then copying over any COS entries which are missing in the embedded
font. You’ll need to repeat this for each font subtype.

But be warned that being PDF/A compliant involves a lot more than just embedding fonts, in
general there’s not much chance that you’re going to be able to write the code to handle
this - it would be a major contribution to PDFBox if you did!

— John

> On 8 Dec 2015, at 08:59, Christian Schmitt <c.schmitt@briefdomain.de> wrote:
> Hello, i wanted to ask if there is a way with PDFBox to embed fonts without providing
> Currently the most example’s are really simple, however they require me to add a text
to the pdf.
> But currently I want to open a existing PDF and Check all the font’s if they are embedded.
(that’s really easy, too).
> And now I want to embed them if they are not (I mostly want to do this for a PDF/A conversion)
> Currently the example’s I looked at: https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java?view=markup
> And I also looked at: https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFiles.java?view=markup
> I mean with the EmbeddedFiles example I could easily embed files. However does this apply
to font,s too? Where are the fonts stored inside a PDF.
> I also had an example to look at all the fonts inside the PDFs but I don’t find it.
> My currently solution creates a PDF/A from a standard PDF, but it won’t conform the
> <signature.asc>
> ---------------------------------------------------------------------
> 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