Page 1 of 1

Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Posted: Sat Nov 01, 2025 1:52 am
by manuel.leonor
Hi team,

I’m currently updating my Stimulsoft environment to the latest version 2025.4.2.
My previous project version was 2023.1.5, and after upgrading, the report generation stopped working.

I have a function that generates a PDF report using XML data, but now the generated report appears completely empty.

Here’s my current code:

Code: Select all

const DownloadReport = async () => {
  const Stimulsoft = window.Stimulsoft
  const report = new Stimulsoft.Report.StiReport();

  const xmlData = await fetch(XML).then(res => res.text());
  const template = await fetch(REPORT_STI).then(res => res.text());

  report.load(template);

  // Load XML data
  const blob = new Blob([xmlData], { type: 'text/xml' });
  const url = URL.createObjectURL(blob);
  const dbCFDi = report.dictionary.databases.getByName("CFDi");
  dbCFDi.pathSchema = "";
  dbCFDi.pathData = url;

  // Report variables
  let variable = report.dictionary.variables.getByName('OriginalString');
  if (variable)
    variable.value = "ORIGINAL STRING EXAMPLE";

  variable = report.dictionary.variables.getByName('OriginalStringSAT');
  if (variable)
    variable.value = "ORIGINAL STRING SAT EXAMPLE";

  report.renderAsync(() => {
    // Export report to PDF
    report.exportDocumentAsync((pdfData) => {
      const fileName = `REPORTE.pdf`;
      Stimulsoft.System.StiObject.saveAs(pdfData, fileName, 'application/pdf');
    }, Stimulsoft.Report.StiExportFormat.Pdf);
  });
};

I’m sending this example using Vite, just to illustrate the issue.
Both the XML and the report template (.mrt) are fetched from APIs, not local files.

I’ve already checked the official documentation and tried several approaches, but haven’t been able to solve the problem.
It seems that some of the functions or data-loading methods might be deprecated or changed in the latest version.

Could you please help me identify what’s changed or how I should correctly load XML data in version 2025.4.2?

Thank you in advance for your help!

Best regards,
Manuel Leonor

download/file.php?mode=view&id=31005

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Posted: Mon Nov 03, 2025 1:08 pm
by Max Shamanov
Hello,

We need some additional time to investigate the issue, we will let you know about the result as soon as possible.

Thank you.
#18710