I am trying to integrate web viewer(PDFNETJS) in my existing solution where we have a parent document which can have multiple annotation related objects on server side. On UI I can load parent document with single annotation data easily by using below code snippet.
MFWA.WebViewer = new PDFTron.WebViewer( {
type: "html5, Silverlight, flash",
initialDoc: pdfDocUrl, // This url will fetch parent document data in application/pdf
path: 'js/PreviewPane/lib/',
enableAnnotations: true,
documentType: "pdf",
serverUrl: serverURL // This is returning annotation data (xfdf) related with parent document in application/xml form
}, pdfObj );
In above case parent document is loading properly along with single annotation object data in web viewer
Case 2: Parent document object can have 2 or many annotation objects on server side
serverURL:
http://localhost//mysampleapp/12/1/xfdfcontent (return first related annotation object data for parent doc)
http://localhost//mysampleapp/12/2/xfdfcontent (return fsecond related annotation object data for parent doc)
MFWA.WebViewer = new PDFTron.WebViewer( {
type: "html5, Silverlight, flash",
initialDoc: pdfDocUrl, //This url will fetch parent document data in application/pdf
path: 'js/PreviewPane/lib/',
enableAnnotations: true,
documentType: "pdf",
serverUrl: // What to pass here because it can load data of single annotation object once
}, pdfObj );
In above case parent document can have 2 or more annotation objects related to that parent object which need to be loaded in web viewer. Suppose 1st annotation object can be square and 2nd can be ellipse.
So in this case I am not able to understand that how it need to be handled on client side as we are using PDFNetJs. Can you please suggest that if we need to load annotation data(xfdf) from multiple server calls in single document then what approach we need to follow?
Regards,
Pawan