Closed viper4gh closed 6 years ago
Maybe use download instead of open, which means that a "Save as" dialog pops up instead of a new tab.
Doku: http://pdfmake.org/#/gettingstarted pdfMake.createPdf(docDefinition).download('optionalName.pdf');
Maybe the name can be dynamic created with date,time, trackname, number of laps ...
https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L1295 https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L1787 https://github.com/eckhchri/pcars-ds-liveview/blob/master/index.html#L1829
With the new implementation the problem cannot happen anymore.
If you use an export button and have the export configured to pdf then a new browser tab is opened with the pdf. You can now save the pdf file. But if you close the liveview tab and go back to the pdf tab then the file is not available on the webserver anymore and cannot be saved. The browser throws a network error.