Product: PDFTron SDK Js
Product Version: 8.2.0
Please give a brief summary of your issue:
-
My annotations is rendered differently when I use doc.getFileData vs what I expect the results should be.
-
This is what I expect the rendered annotations should be:
-
This is the rendered annotation when I use doc.getFileData
-
As you can see, when I use doc.getFileData, The replies to the markup with author “MAI” become independent markups.
-
My code to generate the pdf is the following:
const downloadAsync = async (url, fileName, xfdf) => {
return new Promise(async (resolve, reject) => {
const licenseKey = pdfTronLicenseJs;
const documentURL = url;
const extension = 'pdf'; // pass extension to option if there is no file extension in documentURL
try {
let doc = await CoreControls.createDocument(documentURL, { l: licenseKey, extension });
const options = {
xfdfString: xfdf,
flags: CoreControls.SaveOptions.LINEARIZED
};
let data = await doc.getFileData(options);
const arr = new Uint8Array(data);
const blob = new Blob([arr], { type: 'application/pdf' });
saveBufferAsPDFDoc(blob, fileName);
resolve(true);
} catch (err) {
reject(Error(err));
}
});
}
url = url of the pdf file
filename = filename of the pdf file
xfdf = the xfdf string to combine with the downloaded pdf file
- The xfdf file I used.
PGRP-4453-oval-issue-from-pdftron-from-downloadAsync.xfdf (1.0 MB) - The pdf file I used.
Fixation_Requirements_in_Tunnels_(Guidelines)_JBV_JAM no markup.pdf (1.4 MB) - the Id of the markup in question is “ab2114c2-516c-42ca-b1b3-abab875dd914”
Please describe your issue and provide steps to reproduce it:
1.) Run the code above using the pdf file and xfdf file provided.
Please provide a link to a minimal sample where the issue is reproducible:
N/A