Examples of CIDToGIDMap


Examples of org.apache.pdfbox.preflight.font.util.CIDToGIDMap

    }

    @Override
    protected void checkCIDToGIDMap(COSBase ctog)
    {
        CIDToGIDMap cidToGid = checkCIDToGIDMap(ctog, true);
        this.fontContainer.setCidToGid(cidToGid);
    }
View Full Code Here

Examples of org.apache.pdfbox.preflight.font.util.CIDToGIDMap

     *            true for CIDType2 , false for CIDType0
     * @return
     */
    protected CIDToGIDMap checkCIDToGIDMap(COSBase ctog, boolean mandatory)
    {
        CIDToGIDMap cidToGidMap = null;

        if (COSUtils.isString(ctog, cosDocument))
        {
            // ---- valid only if the string is Identity
            String ctogStr = COSUtils.getAsString(ctog, cosDocument);
            if (!FONT_DICTIONARY_VALUE_CMAP_IDENTITY.equals(ctogStr))
            {
                this.fontContainer.push(new ValidationError(ERROR_FONTS_CIDKEYED_CIDTOGID,
                        "The CIDToGID entry is invalid"));
            }
        }
        else if (COSUtils.isStream(ctog, cosDocument))
        {
            try
            {
                COSStream ctogMap = COSUtils.getAsStream(ctog, cosDocument);
                cidToGidMap = new CIDToGIDMap();
                cidToGidMap.parseStream(ctogMap);
            }
            catch (IOException e)
            {
                // map can be invalid, return a Validation Error
                this.fontContainer.push(new ValidationError(ERROR_FONTS_CIDKEYED_CIDTOGID));
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.