Fix #1112: ASCII85 decode now handles CRLF line endings
The ASCII85 decoder previously failed when encoded data had both carriage return and newline (CRLF) at the end. The code only stripped one trailing character, causing the EOD marker check to fail when CRLF was present. Changed to use bytes.TrimRight to strip all trailing CR/LF characters, which aligns with the PDF specification's requirement to ignore whitespace in ASCII85 encoding. Added test case to verify decoding works with LF, CR, CRLF, and no line endings.
F
Florian Kinder committed
66ea5de124dc6299fda31addad09df40aa9bbc50
Parent: c29c599
Committed by Horst Rutter <hhrutter@gmail.com>
on 10/20/2025, 7:29:06 PM