Closed PhilterPaper closed 3 years ago
Tue Apr 06 18:27:26 2021 PMPERRY@cpan.org - Correspondence added
Do you know if this happens on any particular Operating System and not others (e.g., only on Unix-Linux and not MSDOS/Windows)? What sort of image file are you starting with: GIF, PNG, etc.? The image file itself contains a literal backslash and n (x5C x6E), or is this after some level of processing? This sounds like it might be a problem with the original data being read in non-binary (ASCII) mode.
Steve says he patched this in PDF::API2, but when I applied the patches to string.pm in PDF::Builder, it broke the new test added to string.t. I have reported this.
Turned out to be an overlooked PDF::API2 in the new t-tests. Seems to work fine now, so closing.
From: | stu-github@spacehopper.org To: | bug-PDF-API2@rt.cpan.org Date: | Tue, 06 Apr 2021 17:13:00 -0400 Subject: | Problem with IndexedColor containing "\n" sequence
I have a problem when PDF::API2 processes a file which includes an IndexedColor image where the /Indexed line includes \n:
After processing with PDF::API2 the output file looks like this:
i.e. the
\n
has not been replaced with 0A as should have been done, but a newline was output instead. The string fed to as_pdf in PDF/API2/Basic/PDF/String.pm is correct, the problem is introduced in the output translation to hex. This diff fixes it for me, though I'm not 100% sure it's correct:I'm very sorry but I can't share the actual file I'm using.