Hi,
I was able to fix it but Apache has network problems so it may take some
time.
Tilman
Am 26.11.2025 um 11:40 schrieb Tilman Hausherr:
Hi,
This sounds like https://issues.apache.org/jira/browse/PDFBOX-2378
Tilman
Am 26.11.2025 um 11:23 schrieb Andrea Vacondio:
Hello,
I've been playing with XMP lately and it seems, unless I'm doing
something wrong, that XMPBox serialization is not working properly.
You can modify the TestXMPWithDefinedSchemas to write down the xmp and
parse it again and they all fail.
Like this:
@ParameterizedTest
@MethodSource("initializeParameters")
void main(String path) throws XmpParsingException, IOException,
TransformerException
{
try (InputStream is = this.getClass().getResourceAsStream(path))
{
DomXmpParser builder = new DomXmpParser();
XMPMetadata rxmp = builder.parse(is);
// ensure basic parsing was OK
assertFalse(rxmp.getAllSchemas().isEmpty());
var tmp = Files.createTempFile("prefix", "suffix");
new XmpSerializer().serialize(rxmp,
Files.newOutputStream(tmp), true);
new DomXmpParser().parse(Files.newInputStream(tmp));
}
}
To give some context, I'm trying to modify xmp metadata created by
Acrobat (I can provide the xml file if needed) but the metadata stream
serialized by xmpbox is missing a couple of namespaces defined in the
original one.
Andrea
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]