I’m developing an API application. In the API response I get a pdf in a string. If I use the “from_string” and then the “save” method of the PDF::API2 module the pdf works fine.
If I write the API response string into a file (without using PDF::API2) or use the “from_string” and then the “to_string” method of the PDF::API2 module (which should be the same as I understand) I get an error message and a blank document (or blank with part of the header) when I try to open the file with a pdf reader.
I was wondering what is the difference between the contents of the outputs of the “to_string” and “save” methods?
Thanks in advance for your help.