Dear all,
since some time, IEEE and ACM require that papers be submitted
in PDF format, and that *all* fonts must be embedded...
I use iText to generate PDFs from my Java graphics editor (jfig),
and I would like to add the option to embed all fonts when requested.
This makes the pdfs a bit bigger, but the graphics would be useable
in pdflatex documents for IEEE/ACM/... without clumsy pdf->ps->pdf
conversion (pdftops | ps2pdf14 -dPDFSETTINGS=/prepress ).
Unfortunately, the following code in BaseFont.createFont() simply
resets the "embedded" flag when it encounters one of the builtin
fonts (or the CJK fonts):
public static BaseFont createFont(String name, String encoding, boolean
embedded, boolean cached, byte ttfAfm[], byte pfb[], boolean noThrow) throws
DocumentException, IOException {
...
boolean isBuiltinFonts14 = BuiltinFonts14.containsKey(name);
boolean isCJKFont = isBuiltinFonts14 ? false :
CJKFont.isCJKFont(nameBase, encoding);
if (isBuiltinFonts14 || isCJKFont)
--> embedded = false;
else if (encoding.equals(IDENTITY_H) || encoding.equals(IDENTITY_V))
embedded = true;
...
So, before I try to hack and recompile iText, I have three questions:
1) would it work to just delete the isBuiltinFonts14 test, and the
builtin fonts would also be embedded automagically?
2) If no, what extra steps should be taken to embed the base fonts?
3) If yes, wouldn't this option be useful to other users as well?
Perhaps another parameter like "boolean embedBuiltinFonts14"
Best regards,
Norman
Please reply to my email-address, as I don't subscribe to the list.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar