Package org.apache.pdfbox.pdmodel.font.encoding

Examples of org.apache.pdfbox.pdmodel.font.encoding.Type1Encoding


    // to the pdf and consequently the StandardEncoding is used so that any special character is
    // missing I've copied the code from the pdfbox-forum posted by V0JT4 and made some additions
    // concerning german umlauts see also https://sourceforge.net/forum/message.php?msg_id=4705274
    private DictionaryEncoding encodingFromAFM(FontMetrics metrics) throws IOException
    {
        Type1Encoding encoding = new Type1Encoding(metrics);

        COSArray differences = new COSArray();
        differences.add(COSInteger.ZERO);
        for (int i = 0; i < 256; i++)
        {
            differences.add(COSName.getPDFName(encoding.getName(i)));
        }
        // my AFMPFB-Fonts has no character-codes for german umlauts
        // so that I've to add them here by hand
        differences.set(0337 + 1, COSName.getPDFName("germandbls"));
        differences.set(0344 + 1, COSName.getPDFName("adieresis"));
View Full Code Here


    protected Encoding readEncodingFromFont() throws IOException
    {
        if (getStandard14AFM() != null)
        {
            // read from AFM
            return new Type1Encoding(getStandard14AFM());
        }
        else
        {
            // extract from Type1 font/substitute
            if (type1Equivalent.getEncoding() != null)
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.font.encoding.Type1Encoding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.