I'd like to know if anyone knows of a way to flatten the pdf during creation so that textand images can not be copied out. I am creating the PDF from html.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to know if anyone knows of a way to flatten the pdf
during creation so that textand images can not be copied out. I am
creating the PDF from html.
I think the only way to do so is to forbid all modifications
and encrypt the PDF with a null p/w for the user and a large
one for the owner - this way, users can open the PDF without
any problem but can't do anything forbidden.
If you're under Linux, I do that with qpdf (takes 0.2s to do
that).
Be aware that this "protection" will only last against rookies,
not against experienced people.
--
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I looked at qpdf but it's looks like it only has command line structure. Is it possible to use it from PHP like tcpdf?
Also, to clarify what I'm trying to do. Say you put a document and and image on a scanner and scan it, it becomes one scanned image which you can then turn into a pdf file, they become insperable, that's what I'm looking for.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I looked at qpdf but it's looks like it only has command line
structure. Is it possible to use it from PHP like tcpdf?
http://fr2.php.net/function.exec
But you can achieve that with TCPDF intrinsic features (I use
qpdf because it is hell fast and because I apply some ghostscript
very long processes (compression and image reduction) before doing
that).
Also, to clarify what I'm trying to do. Say you put a document and
and image on a scanner and scan it, it becomes one scanned image
which you can then turn into a pdf file, they become insperable,
that's what I'm looking for.
The way I understand it (making a PDF and apply some magic to
get the result you describe), it is impossible.
The only way to achieve that is the one you describe: scan and
transform into a PDF (which, in turn, can lead to an image that
can be extract from the PDF and skillfully modified, then eventually
re-transformed into a new forged PDF).
So, if you're looking for a way to insure the PDF integrity,
use a checksum next to it (SHA512 is quite a good candidate).
--
Manon: Hi, it's the girl you met this morning :)
Alex: Which one?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'd like to know if anyone knows of a way to flatten the pdf during creation so that textand images can not be copied out. I am creating the PDF from html.
Thanks
On Sat, 15 Mar 2014 13:15:29 +0000
"Mark" liormark@users.sf.net wrote:
I think the only way to do so is to forbid all modifications
and encrypt the PDF with a null p/w for the user and a large
one for the owner - this way, users can open the PDF without
any problem but can't do anything forbidden.
If you're under Linux, I do that with qpdf (takes 0.2s to do
that).
Be aware that this "protection" will only last against rookies,
not against experienced people.
--
Nope. Firefox's built-in viewer ignores protection settings, so many users, including rookies, won't even notice that your PDF is protected.
I looked at qpdf but it's looks like it only has command line structure. Is it possible to use it from PHP like tcpdf?
Also, to clarify what I'm trying to do. Say you put a document and and image on a scanner and scan it, it becomes one scanned image which you can then turn into a pdf file, they become insperable, that's what I'm looking for.
On Mon, 17 Mar 2014 20:55:55 +0000
"Mark" liormark@users.sf.net wrote:
http://fr2.php.net/function.exec
But you can achieve that with TCPDF intrinsic features (I use
qpdf because it is hell fast and because I apply some ghostscript
very long processes (compression and image reduction) before doing
that).
The way I understand it (making a PDF and apply some magic to
get the result you describe), it is impossible.
The only way to achieve that is the one you describe: scan and
transform into a PDF (which, in turn, can lead to an image that
can be extract from the PDF and skillfully modified, then eventually
re-transformed into a new forged PDF).
So, if you're looking for a way to insure the PDF integrity,
use a checksum next to it (SHA512 is quite a good candidate).
--
Manon: Hi, it's the girl you met this morning :)
Alex: Which one?
Have a look at this for ideas:
http://stackoverflow.com/questions/9106959/converting-searchable-pdf-to-a-non-searchable-pdf