When saving the pdf via pdf viewer in the browser window, the suggested filename is not coming correctly in IE,FF, Safari.

Comments

jcnventura’s picture

What's the suggested filename and what's the wrong one?

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

What's the suggested filename and what's the wrong one?

shivachevva’s picture

My suggested files name is [site-name]-[title]-[mod-yyyy]-[mod-mm]-[mod-dd]. But when i save the the pdf file after viewing the pdf file, the file name was wrong. It takes the title as pdf file name.

shivachevva’s picture

Status: Postponed (maintainer needs more info) » Active
jcnventura’s picture

Do you have the token module installed?

shivachevva’s picture

Yes, I already installed Token 6.x-1.18 module.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

As you have node-specific tokens, the replacement willl only work in node pages.. Is the source a node page?

shivachevva’s picture

Yes, It is a node page.

shivachevva’s picture

Status: Postponed (maintainer needs more info) » Active
shivachevva’s picture

In Firefox when I disable the adobe plugin, and i downloaded pdf file. It appears with the correct file name. In the same browser i cant disable the adobe plugin for some reason, so it always opens in window. This works fine, however, in both ffx and IE, when I press the save button from the adobe toolbar I get the wrong file name.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

The filename is only supposed to be assured by the browser if you select the 'Open PDF in - save dialog'.
How the PDF plugins choose to handle the filename is completely outside the control of the module.. Have you tested the save dialog method?

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further info in more than two weeks. Closing the issue.

dsy73’s picture

Version: 6.x-1.17 » 7.x-1.2
Status: Closed (cannot reproduce) » Active

Hello

I have the same issue with version 7.x-1.2: the PDF filename is always "[site-name] - [title] - [mod-yyyy]-[mod-mm]-[mod-dd].pdf".

Tested with Chromium 21 and IE 9 on two computers. With or without Adobe Flash or Adobe PDF plugins.

Token module is enabled. All nodes are concerned.

PDF generation tool = "wkhtmltopdf"
PDF version link = "Block" and "Help Area"
Link in book hierarchy nodes = "Current page and sub-pages"
Open PDF in = "new browser window" or "save dialog"
Paper = A4
Auto-configure the PDF tool settings = check
wkhtmltopdf options = --footer-font-size 7 --footer-right '[page]'
PDF filename = [site-name] - [title] - [mod-yyyy]-[mod-mm]-[mod-dd]

Maybe an incompatible module?

jcnventura’s picture

That's the old Drupal 6 token values.. You need to set it up as "[site:name] - [node:title] - [node:changed:custom:Y-m-d]" for the Drupal 7 version.

It seems I forgot to create a token upgrade function in the path from 6.x -> 7.x..

dsy73’s picture

thanks, its enough for me :)

jglynn’s picture

Getting back to the original filename problem, Firefox and IE have a bug that messes up the default filename when using the Adobe plugin, it doesn't use the value set in the header for Content-Disposition:inline. Works fine in Chrome and Safari.

see firefox bug here https://bugzilla.mozilla.org/show_bug.cgi?id=433613

jglynn’s picture

A kludge to get it to save with the correct filename is append /"your desired filename (with no spaces)" after the pdf url.

So printpdf/34/pdf/filename will default to saving as "filename.pdf" in the adobe browser plugin.

jcnventura’s picture

Status: Active » Closed (won't fix)

@dsy73: looking at the code, I did write an upgrade of the PDF filename tokens to convert between the 6.x and 7.x values. In July 2010, so you must have not run the upgrade functions.

@jglynn: I'm not going to try to fix broken browser/plugins.