0

I am producing PDF using wkhtmltopdf with references to files in a folder located at the same level as the PDF:

 - PDF
 - AttachmentFolder / Attachment 1.extension1
 - AttachmentFolder / Attachment 2.extension1 
 etc.

These links works in 99% of my use cases however in some instances the href link is changed at some point during the production of the PDF (I've checked that the wkhtmltopdf input is correct) and instead of the usual

"file://[absolutePath]/AttachmentFolder/Attachment1.extension"

in the PDF I get

"file://tmp/AttachmentFolder/Attachment1.extension".

which doesn't point correctly to the attachment.

The input path to wkhtmltopdf is a relative path (ex: "./AttachmentFolder/Attachment1.extension") since the idea is that the PDF and associated attachments can be copied and moved to I cannot figure out why the extra "tmp/" is added only in some cases. I've tried changing the name of attachment to have no special characters, a short name, changed the content of the attachment so attachment which work in other documents to no avail.

Any idea what might cause this?

Thank you for the help!

user1965728
  • 91
  • 2
  • 7

0 Answers0