Signing Documents produces really large PDF files
Issue Description
When signing documents, the signed version of the document, documenso produces is really large. Around ~3-5mb for a single page, or ~16mb for a 2 pages document.
Steps to Reproduce
Complete a signing flow and observe the result file's size
Expected Behavior
The files should be as close to the original size as possible.
Current Behavior
The files produced are really large, making their storage long term an issue.
Screenshots (optional)
No response
Operating System [e.g., Windows 10]
No response
Browser [e.g., Chrome, Firefox]
No response
Version [e.g., 2.0.1]
No response
Please check the boxes that apply to this issue report.
- [X] I have searched the existing issues to make sure this is not a duplicate.
- [X] I have provided steps to reproduce the issue.
- [X] I have included relevant environment information.
- [X] I have included any relevant screenshots.
- [X] I understand that this is a voluntary contribution and that there is no guarantee of resolution.
- [ ] I want to work on creating a PR for this issue if approved
Can you provide an example PDF where this happens? I ran a few tests locally but nothing came up significantly larger on my end, there was some file size growth but that's to be expected since the certificate is attached.
Can you provide an example PDF where this happens? I ran a few tests locally but nothing came up significantly larger on my end, there was some file size growth but that's to be expected since the certificate is attached.
Thank you for the reply. For starters, this is on a self-hosted docker based instance. I did some tests since i opened this issue. If i only sign the document, meaning no other fields set and populated, the file size grows just a little bit to include the signature image and certificate as expected.
However if i use a template for the same document which has text fields and drop down menus as well, the resulting signed pdf is huge.
Here's some test pdfs i produced for testing:
Unsigned pdf: test_pdf_unsigned.pdf / file size 414.8kb
Signature Only pdf: test_pdf_signature_only.pdf / File Size 756.4kb
Signature & fields pdf: test_pdf_signature_and_fields.pdf / File Size 5.1mb
test_pdf_signature_and_fields.pdf test_pdf_signature_only.pdf test_pdf_unsigned.pdf
Edit: Re-attached test PDFs
We are experiencing this where our documents grow to 50mb each after adding fields and signing
I am experiencing large PDFs as well. My database is 600MB with 30 completed documents.
This is still happening.
The issue is very simple to replicate - for each field (we are adding via API) the document grows at an unexpectedly large rate.