Hello Tilman,

Thank you so much for fixing this so quickly !
I tried it and it solves the problem for me.

I share your concern about case sensivity, but I think it's wise to be a little 
flexible where there can't be misinterpretation (and especially because it 
works great for me)

Do you have any idea when the 3.0.9 will be officially released ?

Best regards,
Sylvère


On 2026/09/07 11:07:30 Tilman Hausherr wrote:
> Hello,
>
> I've fixed it in https://issues.apache.org/jira/browse/PDFBOX-6257 although 
> I'm not really happy with it (ChatGPT claims it is case sensitive but we all 
> know that ChatGPT is very persuasive even if it lies) but I looked at my 
> comments from last time, so I did it anyway. Please build from source and 
> test your file and tell us whether it worked.

>
> Tilman
>
> On 2026/09/07 10:26:42 Sylvere BABIN wrote:
> > Hello,
> >
> > We use PDFBox to read the XMP metadata of PDF documents in the Factur-X 
> > standard, a Franco-German e-invoicing standard.

> > It usually works very well, but we are experiencing an issue with some PDF 
> > files sent by one of our partners.
> >
> > In the XMP schema of these specific files, one of the property types 
> > doesn't respect the expected case : we got "closed choice of Text" instead 
> > of "closed Choice of Text".

> >
> > <rdf:li rdf:parseType="Resource">
> >                   <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
> >                   <pdfaProperty:valueType>closed choice of 
> > Text</pdfaProperty:valueType>
> >                   <pdfaProperty:category>external</pdfaProperty:category>
> >                   <pdfaProperty:description>The XML invoice data profile in 
> > accordance with ZUGFeRD requirements
> > (permitted values MINIMUM, BASIC WL, BASIC, EN 16931, 
> > EXTENDED)</pdfaProperty:description>
> >                 </rdf:li>
> >
> > In the 
> > pdfAExtensionHelper.java<https://github.com/apache/pdfbox/blob/trunk/xmpbox/src/main/java/org/apache/xmpbox/xml/PdfaExtensionHelper.java>,
> >  the allowed values (CLOSED_CHOICE, CLOSED_CHOICE_U, OPEN_CHOICE and 
> > OPEN_CHOICE_U) are case-sensitive, even if there was a 
> > fix<https://issues.apache.org/jira/browse/PDFBOX-6131> (PDFBOX-6131) to 
> > allow the first letter to be upper or lowercase.

> >
> > So when we try to parse the XMP Metadata with xmpbox (3.0.7, but must be 
> > the same with the last version), we get this exception :

> > Caused by: org.apache.xmpbox.xml.XmpParsingException: Unknown property 
> > value type : closed choice of Text
> >       at 
> > org.apache.xmpbox.xml.PdfaExtensionHelper.populatePDFAPropertyType(PdfaExtensionHelper.java:206)
> >       at 
> > org.apache.xmpbox.xml.PdfaExtensionHelper.populatePDFASchemaType(PdfaExtensionHelper.java:186)
> >       at 
> > org.apache.xmpbox.xml.PdfaExtensionHelper.populateSchemaMapping(PdfaExtensionHelper.java:140)
> >       at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:230)
> >       at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:126)
> >
> > I've searched in the XMP Specification, but there's nothing clear about if 
> > the syntax must strictly respects the specified case.

> > The PDFLib validator accepts the file, and it was issued by a great 
> > national company (I admit it's not a strong argument).

> > So I think that the full "closed choice" or "open choice" types should be 
> > parsed case-insensitively.
> >
> > Unfortunately, I can't share the test file because it contains sensitive 
> > informations, but if you really need one I can try to mock it up.

> >
> >
> >
> > Sylvère Babin
> > Programmeur fondations
> > Cegid XRP Ultimate
> >
> > +33 (0)4 71 64 60 26
> >
> >
> > [Facebook]<https://www.facebook.com/CegidGroup/>  [Twitter] 
> > <https://twitter.com/cegid_ww>   [LinkedIn] 
> > <https://fr.linkedin.com/company/cegid>

> > cegid.com<https://www.cegid.com/>
> >
> > [Cegid]<http://www.cegid.com/>
> >
> >
> >
> >
> > Cegid est susceptible d'effectuer un traitement sur vos données 
> > personnelles à des fins de gestion de notre relation commerciale. Pour plus 
> > d'information, consultez https://www.cegid.com/fr/privacy-policy

> > Ce message et les pièces jointes sont confidentiels et établis à 
> > l'attention exclusive de ses destinataires. Toute utilisation ou diffusion, 
> > même partielle, non autorisée est interdite. Tout message électronique est 
> > susceptible d'altération; Cegid décline donc toute responsabilité au titre 
> > de ce message. Si vous n'êtes pas le destinataire de ce message, merci de 
> > le détruire et d'avertir l'expéditeur.

> >
> > Cegid may process your personal data for the purpose of our business 
> > relationship management. For more information, please visit our website 
> > https://www.cegid.com/en/privacy-policy

> > This message and any attachments are confidential and intended solely for 
> > the addressees. Any unauthorized use or disclosure, either whole or partial 
> > is prohibited. E-mails are susceptible to alteration; Cegid shall therefore 
> > not be liable for the content of this message. If you are not the intended 
> > recipient of this message, please delete it and notify the sender.

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


Cegid est susceptible d'effectuer un traitement sur vos données personnelles à 
des fins de gestion de notre relation commerciale. Pour plus d'information, 
consultez https://www.cegid.com/fr/privacy-policy
Ce message et les pièces jointes sont confidentiels et établis à l'attention 
exclusive de ses destinataires. Toute utilisation ou diffusion, même partielle, 
non autorisée est interdite. Tout message électronique est susceptible 
d'altération; Cegid décline donc toute responsabilité au titre de ce message. 
Si vous n'êtes pas le destinataire de ce message, merci de le détruire et 
d'avertir l'expéditeur.

Cegid may process your personal data for the purpose of our business 
relationship management. For more information, please visit our website 
https://www.cegid.com/en/privacy-policy
This message and any attachments are confidential and intended solely for the 
addressees. Any unauthorized use or disclosure, either whole or partial is 
prohibited. E-mails are susceptible to alteration; Cegid shall therefore not be 
liable for the content of this message. If you are not the intended recipient 
of this message, please delete it and notify the sender.

Reply via email to