With a PDF document already loaded and displayed in PDFTron, we would like to be able to dynamically add annotations created sometime after document load.
In our case, the annotation is persisted to a server as a string of text conforming to the PDF spec, so our hope is that we can leverage existing PDFTron file parsing code even though the PDF will already be fully loaded. The sequence would be:
1) We load a PDF file in the usual way
2) Sometime later we receive a message containing an annotation as a text string conforming to the PDF spec
3) We call some PDFTron API with the annotation represented as a text buffer
4) The annotation appears overlaid on the file loaded in step 1
From your response, I'm assuming that an XFDF acts as a kind of container for form elements, such as annotations, and that in my step #3 above, we would call your new API method: CreateFromXFDF() passing in the text buffer. Is this correct? If so, I see that it returns an FDFDoc. Is there some additional step to associate this FDFDoc with the originally loaded PDF?