Chrome - save PDF function on website

Chrome allows users to hit Ctrl + P and select "Save to PDF."

Can I use this function with the html button?

I want the user to simply click on the button and go directly to the “Save as PDF” prompt (where the file name is set by PHP, not Chrome automatically). Thus, the user basically just clicks the button and clicks the "Save" button in the invitation window.

Is it possible? Can I skip the previous steps?

+5
source share
2 answers

By the time your user can press ctrl + P in view mode, the PHP process that generated the page (on the server) is already closed.

, PHP . HTML/CSS JavaScript.

JavaScript , .

PDF . , , , .

fPDF, - PDF . , PrestaShop.

, , (fPDF) (http://www.fpdf.org/), , , / , PDF- PrestaShop , - PDF.php.

+2

, .

HTML PDF. , - , , DOMPDF.

+3

All Articles