Examples of WinAnsiEncoding


Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

     * @return a PDTrueTypeFont instance.
     * @throws IOException If there is an error loading the data.
     */
    public static PDTrueTypeFont loadTTF( PDDocument doc, InputStream stream ) throws IOException
    {
        return PDTrueTypeFont.loadTTF(doc,stream,new WinAnsiEncoding());
    }
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

     */
    public PDType1Font( String baseFont )
    {
        this();
        setBaseFont( baseFont );
        setFontEncoding(new WinAnsiEncoding());
        setEncoding(COSName.WIN_ANSI_ENCODING);
    }
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

     */
    public PDType1Font( String baseFont )
    {
        this();
        setBaseFont( baseFont );
        setEncoding(new WinAnsiEncoding());
    }
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

        {
            stream.close();
        }
        //only support winansi encoding right now, should really
        //just use Identity-H with unicode mapping
        retval.setEncoding( new WinAnsiEncoding() );
        return retval;
    }
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

        fontStream.addCompression();
        fd.setFontFile2( fontStream );
        retval.setFontDescriptor( fd );
        //only support winansi encoding right now, should really
        //just use Identity-H with unicode mapping
        retval.setEncoding( new WinAnsiEncoding() );
        TrueTypeFont ttf = null;
        try
        {
            TTFParser parser = new TTFParser();
            ttf = parser.parseTTF( file );
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

     * @return a PDTrueTypeFont instance.
     * @throws IOException If there is an error loading the data.
     */
    public static PDTrueTypeFont loadTTF( PDDocument doc, InputStream stream ) throws IOException
    {
        return PDTrueTypeFont.loadTTF(doc,stream,new WinAnsiEncoding());
    }
View Full Code Here

Examples of org.apache.pdfbox.encoding.WinAnsiEncoding

        {
            ttfData.close();
        }
        //only support winansi encoding right now, should really
        //just use Identity-H with unicode mapping
        retval.setEncoding( new WinAnsiEncoding() );
        return retval;
    }
View Full Code Here

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

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

        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

Examples of org.pdfbox.encoding.WinAnsiEncoding

        fontStream.addCompression();
        fd.setFontFile2( fontStream );
        retval.setFontDescriptor( fd );
        //only support winansi encoding right now, should really
        //just use Identity-H with unicode mapping
        retval.setEncoding( new WinAnsiEncoding() );
        TrueTypeFont ttf = null;
        try
        {
            TTFParser parser = new TTFParser();
            ttf = parser.parseTTF( file );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.