PDF Conformance in XMP metadata
Currently Weasyprint does not seem to add any XMP metadata. Here's an example extract from a LibreOffice PDF:
The PDF Conformance metadata is particularly useful as it allows PDF readers to more accurately show the conformance:
https://github.com/mate-desktop/atril/blob/2521fb43d84297f03a6e31125d3e9ce0d2b0b989/backend/pdf/ev-poppler.cc#L422
Thanks for the report.
We already add this information in PDF/A, for example. I think that it’s actually mandatory. The structure is a bit different though:
In WeasyPrint:
<rdf:Description rdf:about="" pdfaid:part="3" pdfaid:conformance="B" />
In LibreOffice:
<rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">
<pdfaid:part>3</pdfaid:part>
<pdfaid:conformance>B</pdfaid:conformance>
</rdf:Description>
We have to check the specification to know what’s the right way to store this.
Both syntaxes are actually possible:
Property and structure field elements that have normal (non-URI) simple, unqualified values may be replaced with attributes in the rdf:Description element.
And your PDF reader should get it here: https://github.com/mate-desktop/atril/blob/2521fb43d84297f03a6e31125d3e9ce0d2b0b989/backend/pdf/ev-poppler.cc#L431
Do you have the problem with PDF/A files generated by WeasyPrint?