You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for a great pdf processing library!
There is an issue in pdfcpu.AddWatermarks causing it to fail if the pdf contains a flated content stream containing an EOF which is not uncommon.
After some investigation, this seem to stem from a known "dubious" behaviour in the standard libraries compression/zlib library. See the following go issue on GitHub: golang/go#14675.
First, thank you for a great pdf processing library!
There is an issue in pdfcpu.AddWatermarks causing it to fail if the pdf contains a flated content stream containing an EOF which is not uncommon.
After some investigation, this seem to stem from a known "dubious" behaviour in the standard libraries compression/zlib library. See the following go issue on GitHub: golang/go#14675.
This has caused regressions in other standard library packages, e.g. golang/go#14676. This have been fixed by wrapping the io.Reader in a stickyErrorReader. See: https://go-review.googlesource.com/c/go/+/20297.
There are other PDF libraries that deal with the situation where an EOF is contained within a flated content stream. E.g., see the decompress function on line 66 in https://github.com/py-pdf/pypdf/blob/main/pypdf/filters.py.
Do you think a similar way of dealing with possible EOFs in flated content streams can be implemented in pdfcpu?
OS: Mac OS X Ventura 13.5.2
The text was updated successfully, but these errors were encountered: