dealfonso / sapp

Simple and Agnostic PDF Document Parser in PHP - sign PDF docs using PHP
GNU Lesser General Public License v3.0
118 stars 31 forks source link

Option to not load whole PDF to memory #60

Open FluffyDiscord opened 10 months ago

FluffyDiscord commented 10 months ago

Hi, I am in need to signing pretty big PDFs ranging from 10MB to - 1GB (thousands of pages) and currently it's not really possible, since they all have to be loaded to memory. Any possibility to make it stream the PDF content and modify/write on the go? Right now I have to split the PDF and sign each page individually. Client then receives huge zip with thousands of small PDFs... since joining them back again invalidates the signature

dealfonso commented 10 months ago

Hi, it is planned to include such a feature in the future. The purpose of creating the class StreamReader was to create a subclass named FileStreamReader to enable reading parts of the original file as needed.