Examples of CMapParser


Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        CMap cmapRet = null;
        PdfObject toUni = PdfReader.getPdfObject(this.font.get(PdfName.TOUNICODE));
        if (toUni != null) {
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream) PdfReader.getPdfObjectRelease(toUni));
                CMapParser cmapParser = new CMapParser();
                cmapRet = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (Exception e) {
            }
        }
        return cmapRet;
    }
View Full Code Here

Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        if (toUni != null){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                // technically, we should log this or provide some sort of feedback... but sometimes the cmap will be junk, but it's still possible to get text, so we don't want to throw an exception
                //throw new IllegalStateException("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
View Full Code Here

Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        CMap cmapRet = null;
        PdfObject toUni = PdfReader.getPdfObjectRelease(this.font.get(PdfName.TOUNICODE));
        if (toUni instanceof PRStream) {
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)toUni);
                CMapParser cmapParser = new CMapParser();
                cmapRet = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (Exception e) {
            }
        }
        return cmapRet;
    }
View Full Code Here

Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        if (toUni instanceof PRStream){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)toUni);
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                // technically, we should log this or provide some sort of feedback... but sometimes the cmap will be junk, but it's still possible to get text, so we don't want to throw an exception
                //throw new IllegalStateException("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
View Full Code Here

Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        if (toUni != null){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                // technically, we should log this or provide some sort of feedback... but sometimes the cmap will be junk, but it's still possible to get text, so we don't want to throw an exception
                //throw new IllegalStateException("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
View Full Code Here

Examples of com.itextpdf.text.pdf.fonts.cmaps.CMapParser

        if (toUni instanceof PRStream){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)toUni);
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                // technically, we should log this or provide some sort of feedback... but sometimes the cmap will be junk, but it's still possible to get text, so we don't want to throw an exception
                //throw new IllegalStateException("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
View Full Code Here

Examples of com.lowagie.text.pdf.fonts.cmaps.CMapParser

        if (toUni == null)
            return;
       
        try {
            byte[] cmapBytes = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
            CMapParser cmapParser = new CMapParser();
            cmap = cmapParser.parse(new ByteArrayInputStream(cmapBytes));
        } catch (IOException e) {
            throw new Error("Unable to obtain cmap - " + e.getMessage(), e);
        }

    }
View Full Code Here

Examples of com.lowagie.text.pdf.fonts.cmaps.CMapParser

        if (toUni != null){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                throw new Error("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

Examples of com.lowagie.text.pdf.fonts.cmaps.CMapParser

        if (toUni != null){
           
            try {
                byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
   
                CMapParser cmapParser = new CMapParser();
                toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
            } catch (IOException e) {
                throw new Error("Unable to process ToUnicode map - " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

Examples of org.apache.fontbox.cmap.CMapParser

    private void parseCmap( String cmapRoot, InputStream cmapStream, COSName encodingName ) throws IOException
    {
        if( cmapStream != null )
        {
            CMapParser parser = new CMapParser();
            cmap = parser.parse( cmapRoot, cmapStream );
            if( encodingName != null )
            {
                cmapObjects.put( encodingName, cmap );
            }
        }
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.