in reply to PDF::API2: Difference between the contents of the outputs of the “to_string” and “save” methods
When you have a problem like this, you may want to use a diff tool to find the difference(s) between the files. Often that'll give you the clues needed to figure out what is happening.
When your only tool is a hammer, all problems look like your thumb.
In Section Seekers of Perl Wisdom