Pdf header not found error while importing xfdf into pdf file url

WebViewer Version:

Do you have an issue with a specific file(s)? All
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
While importing xfdf into pdf url , I encountered a bug while loading it into the viewer or downloading in system.

Please describe your issue and provide steps to reproduce it:
Getting a pdf header missing error on webviewer.

Please provide a link to a minimal sample where the issue is reproducible:
annotManager.exportAnnotations().then(async (xfdfString: any) => {

        // Optionally read XFDF from a string

        const fdf_doc = await PDFNet.FDFDoc.createFromXFDF(xfdfString);

        // Merge FDF data into PDF doc

        const doc = await PDFNet.PDFDoc.createFromURL(

          'https://parspec-staging.s3.us-east-2.amazonaws.com/media/datasheets/LITHONIA/cds.pdf'
        );
        await doc.fdfMerge(fdf_doc);
        const arr = new Uint8Array(doc);
        const blob = new Blob([arr], { type: 'application/pdf' });
       FileSaver.save(blob, 'test.pdf);

}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hello himani.sharma,

What version of WebViewer are you using?
Have you enabled FullAPI?
Have you initialized PDFNet? You can like so: await PDFNet.initialize();

Best Regards,
Tyler Gordon
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com