Force Download
This is an open discussion with 22 replies, filed under Extensions.
Search
Is there any way I can use this in conjunction with the urltopdf extension?
I've managed to create a PDF out of a Symphony page using urltopdf, but ideally I'd like it to download instead of displaying in the browser.
The URL at which my PDF is ultimately generated looks like this: http://website.co.uk/pdf/compile/,0,69,22,26,/
(where the last URL segment is a list of entry IDs used to filter the result).
If I add ?download=pdftitle.pdf
to the end, the page just reloads (nothing downloads).
Any ideas?
Update: I found a parameter within the library that @creativedutchmen's fork of urltopdf uses (mPDF) that forces download: $mpdf->Output('MyPDF.pdf', 'D');
Is there anyway to further protect files by adding conditions in the page xsl? I only want to allow users that are logged in (members extension) to be able to download. Thanks!
Create an account or sign in to comment.
That works perfectly now. Thanks Giel.