You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2026/10/16 19:11:00 UTC

[jira] [Resolved] (PDFBOX-6285) False Positive for Group with empty Type

     [ https://issues.apache.org/jira/browse/PDFBOX-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-6285.
-------------------------------------
      Assignee: Tilman Hausherr
    Resolution: Fixed

Thank you!

> 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
>            Assignee: Tilman Hausherr
>            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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org