in reply to PDF::API2: Difference between the contents of the outputs of the “to_string” and “save” methods

This kind of thing can happen when the files are opened with the wrong encoding (in this case I assume it should be :raw, Update: which actually means "no other encoding layers" or "binary") or with :crlf enabled, and you may need to binmode the file that you are opening yourself, but that's just a guess. Can you please post a Short, Self-Contained, Correct Example that reproduces the issue?

  • Comment on Re: PDF::API2: Difference between the contents of the outputs of the “to_string” and “save” methods
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: PDF::API2: Difference between the contents of the outputs of the “to_string” and “save” methods
by espero (Novice) on Jun 28, 2022 at 14:03 UTC
    Hello haukex,

    Thank you very much for your help and prompt reply, I added binmode and it works perfectly.