dokuwiki-plugin-dw2pdf
dokuwiki-plugin-dw2pdf copied to clipboard
embed media as file annotation
Hi,
these changes let dw2pdf optionally embed media files in the pdf output.
Regards,
Can you explain what this is supposed to do? From the settings it seems it should work on linked media files only but the code seems to run for embedded images as well?
Thanks for pointing out the missing translation. This is fixed now.
This patch is supposed to attach every media file where dokuwiki would create a media link, currently these are mostly pdf files in my wiki. This does (at least in my wiki) not include images that get inlined into the page - they are already handled by dw2pdf.
<annotation>-tag is a custom tag of the mPDF library: http://mpdf1.com/manual/index.php?tid=284
Todo:
- If I understand this annotation, the media files are included in the exported pdf. This means that cache expiring should depend on these files as well (only when included) . The cache name should depends on the
attachmentconfig value as well.
Questions:
- when the file is generated the file permissions are checked. Are there scenarios where people can download a cached pdf, while the acl for certain files are changed?
- I think a url-parameter for enabling embedded media is a consistent addition (other config options has also their url parameter). Is this a possible security and/or performance issue? Should config
attachmenthas the choices:Yes,No,Never. Where theYesandNoare overridable by urlparameter, but theNevernot? - Are all types of media files included in the pdf, is this desired and meaningful? for example: a powerpoint and word file are included as well?
- for my curiosity to the result: can you share a pdf with some annotations? (sofar I still have to figure out howto simply fork a fork at github, for testing)
To answer your first question: yes it's possible media files can leak through cached PDFs. That's what the nocache option is for (and it's mentioned in it's description). Might be worth to make that more clear on the wiki page?