Adomas Birštunas created PDFBOX-6342:
----------------------------------------

             Summary: PdfBox use invalid type for UseCMap field
                 Key: PDFBOX-6342
                 URL: https://issues.apache.org/jira/browse/PDFBOX-6342
             Project: PDFBox
          Issue Type: Bug
          Components: Preflight
    Affects Versions: 3.0.8 PDFBox, 2.0.36
            Reporter: Adomas Birštunas
         Attachments: veraPDF test suite 6-2-11-3-3-t03-pass-a.pdf

{color:#000000}PDF-1.7 section 9.7.5.3: optional field UseCMap type is name or 
stream.{color}
 
{_}{color:#000000}org.apache.pdfbox.preflight.font{color}.{_}{color:#000000}_Type0FontValidator_
 method {color}
_{color:#00627a}processCMapAsStream{color}({color:#000000}COSStream 
{color}aCMap)_ use cast {color:#000000}UseCMap {color}field into 
{color:#000000}{_}COSDictionary{_}.{color}
{color:#000000}Despite this on the next line _cmapUsed_ is provided to method 
{color}
{_}checkCMapEncoding(..){_}, which expects to get {_}COSName{_}, 
{_}COSStream{_}, or {_}COSString{_}.
 
Therefore, parameter _{color:#000000}cmapUsed{color}type_ shall be _COSBase_ 
and no cast to be performed.
 
An example of the PDF file provided.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to