Display and annotate a PDF in a web app

I am a bit confused as to how I could display a PDF to a web app user and allow him to add annotations.

I have read quite a few texts about DynaPDF but it appears that I must render the PDF to a JPG for display. Am I missing something?

Is there any way to add annotations to an original PDF that contains selectable text and is not a bitmap?

I am thinking I might have to display a bitmap and obtain the annotation from the user (location and text) but then retrieve the original PDF and use DynaPDF to add the annotation to that file? In this case I would also have to handle any scrolling to be sure I have the proper coordinates to apply onto the original file.

Would this work? Are there other ways to do this?

Thanks in advance!

Edward
(for Alain)

You can show a jpeg of the rendered page.
If user clicks on it, you can calculate the coordinate in PDF page coordinates and then add an annotation and render a new picture.
DynaPDF is quite fast, so some people do live editing while DynaPDF renders pages for preview.

Thank you!

Simple enough if the PDF is local but I discovered I have a webfile reference to the PDF. I do not see how to render from a webfile URL. Is this possible?

The big issue for a web app is that only Mac can display PDF natively.

Windows Internet Explorer needs Acrobat Reader plugin to display PDF. Windows 10 Edge can do that, as well as Chrome, but I haven’t got any idea if the PDF is editable.
Because of that fragmentation, a jpg is required so any PC can display it.

That said, in theory, if you have a Mac or a Windows machine with AR installed as client, you should be able to do whatever you do locally, for instance fill up a PDF or sign it.

But I do not think Webfiles can update the source document from the client’s display. You would need to create some mechanism to send back the modified document. In practice, the user would need to bring the document to his disk, and then send it back with a File Uploader.

You can pass the data from WebFile to the OpenImportBuffer function in DynaPDFMBS class.