alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.01k stars 774 forks source link

is there a way i can save rendered pdf using php code? #102

Closed amitleuva1987 closed 5 years ago

amitleuva1987 commented 5 years ago

I want to save the rendered pdf using php or html code like below.

Download pdf

when i click on Download PDF, a pdf should get downloaded.

kimmobrunfeldt commented 5 years ago

This would require a modification to the code. I think a good implementation would be to add a download=true query parameter which would then cause the server to respond with correct download headers.

I would accept a PR for this.

kimmobrunfeldt commented 5 years ago

Actually this is possible with attachmentName parameter already: https://github.com/alvarcarto/url-to-pdf-api/pull/46. It has gone in without documentation, I'll fix that.