Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update text masking for PDF attachments
Large PDFs attachments, with lots of images are sometimes received. These will normally will be compressed and expand to much larger files size. This can cause memory issues due to how we are passing the data around the application to external commands such as `pdftk`. Passing this data via STDIN to `pdftk` to seems to be the main issue here where we are seeing uncompressed PDFs over 900Mb not able to be re-compressed despite leaving the process running for over 1 hour. This change switches to use tempfiles when uncompressing or compressing PDF attachments which, in testing on my development and WDTK production environment, allows the whole `apply_masks` process which includes uncompressing and re-compressing, to complete in under 2 minutes.
- Loading branch information