On #330 (feature/pdfa-2-conformance), an embedded file stream's MIME /Subtype is always application/octet-stream, whatever the file is. That covers files from <annotation file="…"> and from SetAssociatedFiles() when no mime is given.
That passes PDF/A-3 (6.8-1 needs a valid type, not the right one). E-invoicing profiles and viewers use the type, though. Factur-X (#368) needs text/xml for its XML, and viewers use the type to choose an icon and a handler.
Expected. Derive the subtype from the file's extension, or from content sniffing (finfo where available), for the same allow-list of types that #375 maps. Fall back to application/octet-stream.
On #330 (
feature/pdfa-2-conformance), an embedded file stream's MIME/Subtypeis alwaysapplication/octet-stream, whatever the file is. That covers files from<annotation file="…">and fromSetAssociatedFiles()when no mime is given.That passes PDF/A-3 (6.8-1 needs a valid type, not the right one). E-invoicing profiles and viewers use the type, though. Factur-X (#368) needs
text/xmlfor its XML, and viewers use the type to choose an icon and a handler.Expected. Derive the subtype from the file's extension, or from content sniffing (
finfowhere available), for the same allow-list of types that #375 maps. Fall back toapplication/octet-stream.