I am creating polyline annotation in the PDF file, and it is working fine on web viewer but when I am opening that file on the edge browser, Polyline annotation is not showing. It should show on all browsers
1- add any line on polyline annotation in web vewer
2- Save the file in the database
3- Download file with our web application
4- Open that downloaded PDF file in the edge browser. Line and polyline are not visible
Note: -If I am opening that file in the web viewer, then It’s working. issue is only if I downlod file and open in edge and chrome browser as you can see in below image.
I got the exact issue. Actually, issue is with import annotation code.
const doc1 = documentViewer.getDocument();
const xfdfString = await annotationManager.exportAnnotations();
const data = await doc1.getFileData({
// saves the document with annotations in it
xfdfString
});
const doc = await documentViewer.getDocument().getPDFDoc();
If I am using above code to import annotation, then it’s working (Polyline annotation is showing on edge browser). But in this code, I am getting another issue. When I am applying multi digital certificate with different user on the pdf file then older digital signature got corrupted. To resolve this issue, I am using the below code to import annotation
But with this code I am getting this issue (polyline annotation is not showing on edge browser).
Is there any other code to import annotation?
Please let me know which code I should use to import annotation So that my both issues (multiple signatures corrupted and polyline annotation issue on edge browser) get resolve.
We suggest using the WebViewer import and export xfdf commands as we have to draw the newly imported annotations to the canvas which the fdfUpdate does not do since it only updates the underlying PDF object.