doc.extractXFDF fails in my specific document

Product: WebViewer

Product Version: 8.2.0

Please give a brief summary of your issue:

doc.extractXFDF fails when I call it on a particular pdf document

I have the code below that linearizes a pdf file. When I pass my file to it, it fails with the error:

    "type": "InvalidPDF",
    "message": "Exception: \n\t Message: Exception: \n\t Message: Put() can't be invoked on Obj of this type.\n\t Conditional expression: false\n\t Version      : 9.1.1-158c71b047\n\t Platform     : Emscripten\n\t Architecture : Emscripten\n\t Filename     : \n\t Function     : IllegalFunctionException\n\t Linenumber   : 821\n\n\t Filename: \n\t Function: \n\t Linenumber: "

The code is shown below.

const linearizePdf = async (fullPath) => {
  return new Promise(async (resolve, reject) => {
    const licenseKey = pdfTronLicenseJs;
    const path = fullPath;
    const extension = 'pdf';

    try {
      let doc = await CoreControls.createDocument(path, { l: licenseKey, extension });      
      let result = await doc.extractXFDF();

      const options = {
        flags: CoreControls.SaveOptions.LINEARIZED,
        xfdfString: result.xfdfString

      let data = await doc.getFileData(options);
      const arr = new Uint8Array(data);
      const blob = new Blob([arr], { type: 'application/pdf' });
    } catch (err) {


Please describe your issue and provide steps to reproduce it:

1.) Run the code above with the file I will provide
2.) It will raise an exception on the doc.extractXFDF line

For internal reasons, I cannot provide a link to the file here. Please reply with your email address so I can send you the file directly along with additional instructions.

Please provide a link to a minimal sample where the issue is reproducible: N/A

Hi Adrianm,

Thank you for contacting us regarding Webviewer.

Yes, you can send the sample file to, we will investigate with the sample file and update you.

Thank you for the additional information. A ticket has been raised with the dev team to review further.

I am happy to report that the team has resolved this issue, and patched our current 10.0 SDK release.

You can download patched production release builds here.
Release channel: PDFTron Systems Inc. | Nightly
Latest official builds, and Release channel, are ready for production usage, however the developer channel builds do not get the same amount of testing and can be in a state of change.

For NodeJS builds go here: PDFTron Systems Inc. | Nightly