I found this online:

http://itext-general.2136553.n4.nabble.com/PdfSmartCopy-not-reusing-a-fo
nt-resource-td2170980.html

I understand the PdfSmartCopy will not strip out embedded fonts if only
a subset of the font was used.  I would like to embed the entire font in
my PDFs (it only has 10 glyths) so the when I concat them, smart copy
will only embed the font once (instead of once per concat'd pdf).

Will "_ocr.setSubset(false);" do the trick?  I have a Font utility class
like so:


public class Fonts {

        private static final String OCR_FONT_FILE =
"/resources/fonts/OCRAEXT.ttf";

        static {
                BaseFont _ocr = null;
                try {
                        _ocr = BaseFont.createFont(OCR_FONT_FILE,
BaseFont.WINANSI,
                                        BaseFont.EMBEDDED);
                        _ocr.setSubset(false);
                } catch (Exception e) {
                        throw new RuntimeException("failed to load OCR
font from "
                                        + OCR_FONT_FILE);
                }
                OCR = new Font(_ocr, 11);
        }

        public static final Font OCR;

        public static final Font BASE =
FontFactory.getFont(BaseFont.HELVETICA, 9);
        public static final Font BOLD =
FontFactory.getFont(BaseFont.HELVETICA, 9, Font.BOLD);

        private Fonts() {
                // this is a utility class...do not instantiate it!
        }
}


Jason Berk
[email protected]
www.purduefed.com
800.627.3328 x8902


This is a transmission from Purdue Federal Credit Union (Purdue Federal) and is 
intended solely for its authorized recipient(s), and may contain information 
that is confidential and or legally privileged. If you are not an addressee, or 
the employee or agent responsible for delivering it to an addressee, you are 
hereby notified that any use, dissemination, distribution, publication or 
copying of the information contained in this email is strictly prohibited. If 
you have received this transmission in error, please notify us by telephoning 
(765)497-3328 or returning the email. You are then instructed to delete the 
information from your computer. Thank you for your cooperation.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to