[ 
https://issues.apache.org/jira/browse/PDFBOX-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127954#comment-18127954
 ] 

ASF subversion and git services commented on PDFBOX-6285:
---------------------------------------------------------

Commit 1939167 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1939167 ]

PDFBOX-6285: type field is optional, by Adomas Birštunas

> False Positive for Group with empty Type
> ----------------------------------------
>
>                 Key: PDFBOX-6285
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6285
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight
>    Affects Versions: 2.0.37, 3.0.8 PDFBox
>            Reporter: Adomas Birštunas
>            Priority: Major
>             Fix For: 2.0.38, 3.0.9 PDFBox
>
>         Attachments: veraPDF test suite 6-2-10-t03-pass-a.pdf, veraPDF test 
> suite 6-2-10-t03-pass-a_pdfA1.pdf
>
>
> {color:#8c8c8c}PDF 1.4 section 4.9.2, (see Table 4.42) and PDF 1.7 section 
> 8.10.3 (see Table 96):{color}
> {color:#8c8c8c}if Type field is presented in a Group dictionary, then value 
> of Type must be "Group", but field is optional.{color}
> {color:#8c8c8c}No additional requirements in PDF\A-1 or PDF\A-2.{color}
>  
> {color:#000000}org.apache.pdfbox.preflight.xobject.{color}XObjFormValidator 
> class method checkGroup() does rise an error if Group dictionary does not 
> contain Type field at all.
>  
> {color:#000000}Same problem in PdfBox 3.0.8 and in 2.0.36.{color}
>  
> Fix:
> {color:#0033b3}if 
> {color}(!{color:#000000}COSName{color}.{color:#871094}GROUP{color}.equals({color:#000000}groupDictionary{color}.getCOSName({color:#000000}COSName{color}.{color:#871094}TYPE{color})))
> Replace with:
> {color:#000000}COSName type {color}= 
> {color:#000000}groupDictionary{color}.getCOSName({color:#000000}COSName{color}.{color:#871094}TYPE{color});
> {color:#0033b3}if {color}({color:#000000}type {color}!= {color:#0033b3}null 
> {color}&& 
> !{color:#000000}COSName{color}.{color:#871094}GROUP{color}.equals({color:#000000}type{color}))
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to