Print file and save to PDF with custom javascript name

0

I have the following code where the client by pressing Print it prints the file or saves it to PDF and then closes the window:

..... 
<script>window.print(); setTimeout("window.close()",50)</script>

It works perfectly. The content comes from the database, but when it clicks to print to save to PDF, the file name becomes output.pdf and it has to be renamed.

Do you have the name of the file already out customized to the name that comes from the database?

    
asked by anonymous 25.04.2018 / 16:45

0 answers