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

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


    {
        super(baseFont);
       
        dict.setItem(COSName.SUBTYPE, COSName.TYPE1);
        dict.setName(COSName.BASE_FONT, baseFont);
        encoding = new WinAnsiEncoding();
        dict.setItem(COSName.ENCODING, COSName.WIN_ANSI_ENCODING);

        // todo: could load the PFB font here if we wanted to support Standard 14 embedding
        type1font = null;
        type1Equivalent = ExternalFonts.getType1EquivalentFont(getBaseFont());
View Full Code Here


        stream.getStream().setInt(COSName.LENGTH1, stream.getByteArray().length); // todo: wrong?
        stream.addCompression();

        // only support winansi encoding right now, should really
        // just use Identity-H with unicode mapping
        Encoding encoding = new WinAnsiEncoding(); // fixme: read encoding from TTF

        this.fontEncoding = encoding;
        dict.setItem(COSName.ENCODING, encoding.getCOSObject());

        // as the stream was close within the PDStream constructor, we have to recreate it
        InputStream stream2 = null;
        PDFontDescriptor fd;
        try
View Full Code Here

TOP

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

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.