Package com.itextpdf.text.pdf.fonts.cmaps

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


        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


        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

        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

        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

        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

        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

TOP

Related Classes of com.itextpdf.text.pdf.fonts.cmaps.CMapParser$Operator

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.