Forum How do I...?

PDF 1.7+/256-bit encryption?

facboy
are there any plans for prince to output PDF 1.7+ and AES-256 encryption?
mikeday
It's on the roadmap, although we might not get to it for a while. Is there a particular use case that specifically requires AES encryption?
facboy
no, mostly naive later/bigger = better :).
mikeday
Generally earlier/smaller = more interoperable, easier to use. :)
michaelt
are there any plans to implement AES-256 encryption soon?

I just started testing Prince and created some password protected 128 RC4 encrypted PDFs and they are easily cracked by others in under 10 seconds!

Is encryption totally separate from password protection?

How can you better password-protect PDFs created with Prince? What is the maximum password length you can use?
mikeday
We will take another look at this.
michaelt
I will be interested to hear your thoughts.
michaelt
any ideas?
mikeday
Sorry we have not had a chance to do this yet, as we have been busy released Thai line-breaking support and initial support for SVG filters.
michaelt
ok .... is it your hope to do this in the near future?
mikeday
It seems we won't be able to start this yet, so the fastest solution would be to use a third-party tool to encrypt the PDF file after creating it with Prince. Hopefully we can revisit this situation before the end of the year.
michaelt
that doesnt really help - the PDFs are displayed directly in the browser - I cannot encrypt them further before displaying - or can I.

Can you give more details of how this could be done?
mikeday
When you generate the PDF you could save it to a buffer or to a file on the server, then pass that to a tool to encrypt it, then take the result and return it to the browser.