views:

46

answers:

1

I am trying to create an interface to allow easy editing of PDFs like VuePDF in an application I am building. This is not core to the application and will only be used by the admin.

I was wondering if there was a per-built stack for editing PDFs in the browser window?

Basically the admin user needs to black-out private data, like names and addresses.

If there is not currently a solution I was thinking of some like:

  • Using ImageMagik to create JPEG version of each page
  • Using the canvas element to add black marks to the image
  • Recording the location of top-left and bottom right of each black mark
  • Sending back the coordinates and adding black rectangles to the original PDF

Is that correct?

+1  A: 

If you draw over the PDF, the data will still be there in the PDF and easy to extract. I wrote a blog article explaining the issue at http://www.jpedal.org/PDFblog/?p=553

You need to replace the text in the PDF command stream as well.

mark stephens
Thank you you are 100% right
Dale Hurley