Fix high memory usage during signing

Details

Description

Hello. We have a requirement to be able to sign huge pdf files consisting entirely from paper scans. Unfortunately current implementation unnecessary buffers entire pdf contents during signing procedure. This patch suggests a fix.