Annotating PDFs using JavaScript in the browser (V2)


Hi all,

New member to Sitepoint here – actually just signed up for their premium membership. :slightly_smiling_face:

Anyway, I have been doing some research on the best way to enable users to annotate a PDF via a web app. I found this thread (Annotating PDFs using JavaScript in the browser) and this individual has described my scenario and asked the same question I would have.

To paraphrase:

Users would now like to view the documents (PDFs) and create their own private annotations. They must be able to create boxes, arrows and other drawing primitives, as well as write text anywhere on top of the PDF.

We need to capture the annotations so that we can save them in a database for that specific user. The reason is that the annotations should be considered personal/private. When the same user views the same PDF/page again, we need to display the annotations and let the user edit/delete/add annotations.

It occurs to me that we could convert the PDFs client-side to a html5 canvas. Annotations could then be performed within the bounds of the canvas.

The question is now: Does anyone here know of any open source or commercial product that will do this? Is there any way to combine a PDF-to-canvas renderer with some kind of annotation JavaScript library that was really intended for annotating web pages but can be used this?

Has any progress been made on open source solutions since this original post, which was January 2015? Surely there must be substantial progress. I have found a few proprietary ($$$) products which claim to do what we’re after but again they are pricey.

I have also considered building on top of Mozilla’s PDF.js library, but unsure if there are other options which would make this easier.

closed #2

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.