Filename of printed web page defaults to script name

Post here if you have problems installing or using doPDF.
anon
Posts: 38
Joined: Tue Jun 03, 2008 8:42 am

Postby anon » Tue Sep 02, 2008 1:39 pm

I think this is a bug (but it also might be a feature :)


If you try to print a web page located at



t



which generates



n



doPDF defaults the name to "pagename.php?var1=value1&var2=value2" instead of "data.pdf"



anon
Posts: 38
Joined: Tue Jun 03, 2008 8:42 am

Postby anon » Tue Sep 02, 2008 1:43 pm

t = http://www.example.com/pagename.php?var1=value1&var2=value2

n = content-type: application/octet-stream; content-disposition: attachment; filename: "data.pdf"



Softland
Posts: 1480
Joined: Thu May 23, 2013 7:19 am

Postby Softland » Wed Sep 03, 2008 10:27 am

Hi,

This is a browser thing, not something we can control via doPDF.


For example, Internet Explorer will send as filename for doPDF to use the url of the printed page. So in your example the name of the pdf would be something like www_example_com_pagename.php_var1=value1.pdf (it replaces some characters that might not be allowed by Windows when creating the file).


On the other hand, FireFox sends as filename for doPDF to use the title of the page.

So there's not much we can do.




Return to “Troubleshooting”