When a file is attached, pdfkitchecks to see if an identical file has already been attached and reuses its reference to reduce the size of the resulting pdf. Currently the code for checking file equality is broken; in particular, the dates for modification and creation are compared by reference:
Bug Report
When a file is attached,
pdfkit
checks to see if an identical file has already been attached and reuses its reference to reduce the size of the resulting pdf. Currently the code for checking file equality is broken; in particular, the dates for modification and creation are compared by reference:Line
107-115
oflib/mixins/attachments.js
:Should be:
Opened this PR to fix: https://github.com/foliojs/pdfkit/pull/1544
Your environment