It doesn't seem to have fixed the issue. I can share the xmp stream
but you can also use one of those already there, like
validxmp/Notepad++_A1b.xmp
If you parse it, serialize it and re-parse it, it will fail
complaining that the stEvt prefix is not associated... I think it's
because the xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#";
is gone in the resulting file.
Andrea

Il giorno mer 26 nov 2025 alle ore 21:16 Tilman Hausherr
<[email protected]> ha scritto:
>
> fixed
>
> https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/xmpbox/3.0.7-SNAPSHOT/
>
> Please check that it works now. If not, please share your xmp file.
>
> 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]
>

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

Reply via email to