How to run pdf viewr without save file in exportToPDF()

  1. If you use the ‘exportToPDF’ function in a project in progress, it will be saved as a file. Is there any way to run ‘pdf viewer’ without saving it?

  2. Can I set the location where the pdf file is stored if the first question does not work?

Hi,

You can get the link to dowload the exported file, see in the snippet how to do it:
http://snippet.dhtmlx.com/1ae2c1c9c

Thanks, i’ll try for your advice.

scheduler.exportToPDF({
        name: `${config.fileName}.pdf`,
        format: config.format,
        orientation: config.orientation,
        zoom: 1,
        header: `<h1>${config.header}</h1><p>${config.subHeader}</p>`,
        callback: (result) => {
          console.log('result.url', result.url);
        }
      });

result.url, this code is run for save pdf file.
How to run without save file? Is there another way?

IF you want to open the file without saving, unfortunately it is not possible. Because the function exportToPDF creates the document and you can just save it, not open as online document. To show the file immediately you need to save it and then open in new tab.

Thanks your reply, polina^^