Hi Tom,
Yes quite right. As The Wanderer points out the CreationDate and ModDate differ, as do the uuid in the Catalog Metadatas and the trailer ID.
I've found that deleting the optional dates from the Info dictionary, the Metadata entry from the Catalog and resetting the ID does seem to be enough to make output PDFs identical. In the simple case at least.
p2s2pdf-strip.raku in.pdf [out.pdf] # post-process ps2pdf output
I've used the lower level PDF::Reader interface, which doesn't often get used directly. But in this case, we also need to bypass Raku PDF also attempting to update the same fields. The PDF also needs to be rewritten, rather than being incrementally updated.
Hope that works in this case.
Regards
David Warring