-2

Here is what I have in my mind:

First, I will view the document in an embed tag.

Second, Users can print the pdf, but these are confidential files so they need to coordinate to the document controller to have their own copy.

Third, When they will print the PDF, there is some action that will put a watermark in the pdf . I researched and here's what I found out:

http://techienextdoor.blogspot.com/2012/10/pdfwatermarker-apply-image-watermark-to.html

I want to integrate this in my implementation because it is easy. But I don't know where to start.

My mind is puzzling how to intercept the action (so that I could put the watermark) before printing the PDF in PHP?

mmr
  • 516
  • 11
  • 30
  • Adding the watermark wouldn't be your problem, but if they use the PDF print button you won't be able to add a watermark before it gets sent to their printer. – Jon Mar 12 '13 at 00:29

2 Answers2

1

You need to generate your user specific watermarked file before viewing. Otherwise anyone could just save your original file.

Alex P.
  • 30,437
  • 17
  • 118
  • 169
  • Yes I have that in my mind, After uploading - the path file for the generated watermark will be save in the db, then there's also another path for the pdf without watermark which will I use for viewing. Now how can i retrieve in the db the path for pdf w/ watermark when they will print it? – mmr Mar 12 '13 at 00:36
  • you missed the point. do not let anyone "view" the original file. once downloaded "for viewing" you have no control over what they do with the file. – Alex P. Mar 12 '13 at 00:40
  • therefore I will view the document with a watermark? if that will be the case, then they could not read the content on the web. I just don't want them to have a printed copy for control. – mmr Mar 12 '13 at 00:46
  • you need to choose what is more important to you - convenience of your users or security of your data. all I am saying that there's no "viewing" of a file using the embedded player. this way the file is being sent to the client side and they can do whatever they want with it. – Alex P. Mar 12 '13 at 00:57
0

It can be done very easy with php. You can start here.

http://www.php.net/manual/en/ref.image.php

Patrick Aleman
  • 612
  • 6
  • 19