Am 08.12.2015 um 18:39 schrieb Christian Schmitt:
I know that however first I search for a solution on the font problem. ;)
You'd need to read about the different font types, and then integrate
the actual font into the PDF file. Of course you must have the fonts in
the proper type. Or replace the font descriptor. Probably work for
several weeks.
Btw about your question - the fonts are in the resource dictionaries of
pages, XObject forms, patterns, sometimes also in annotations and
fields. Download PDFDebugger and then look at the pages of your PDF.
Tilman
Am 08.12.2015 um 18:30 schrieb Tilman Hausherr <[email protected]
<mailto:[email protected]>>:
Am 08.12.2015 um 17:59 schrieb Christian Schmitt:
Hello, i wanted to ask if there is a way with PDFBox to embed fonts
without providing text.
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 standard.
There are many possible problems with ordinary PDF files, it isn't
just about fonts - just check your file with PDFBox preflight. So
even if you manage to fix the non embedded fonts, you'll still have
many other problems.
Tilman