Polyline annotation is not showing on the edge browser

Hi,

I am using webviewer version 11.0.0

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

Please let me know what I am missing ?

1 Like

Hello rahul.tech8,

Thank you for reaching out,
I was unable to reproduce this issue on Edge on our samples environment JavaScript PDF Viewer Demo

Can you provide steps to reproduce this issue?

Best regards,
Tyler

1 Like

Hi,

I am using below code to import annotation in the pdf file.

const xfdfString = await annotationManager.exportAnnotations({
useDisplayAuthor: true,
});
// import annotations to PDFNet
const fdf_doc = await PDFNet.FDFDoc.createFromXFDF(xfdfString);
await doc.fdfUpdate(fdf_doc);

Please check with above code.

Hi,

step to reproduce issue:

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

       const xfdfString = await annotationManager.exportAnnotations({
           useDisplayAuthor: true,
        });
         // import annotations to PDFNet
        const fdf_doc = await PDFNet.FDFDoc.createFromXFDF(xfdfString);
        await doc.fdfUpdate(fdf_doc);

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.

1 Like

Hello rahul.tech8,

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.

See this guide here: Import & Export Annotations with JavaScript | Apryse documentation

Best regards,
Tyler

1 Like