Closed Bug 1346682 Opened 6 years ago Closed 6 years ago

[jsplugins] Set title to document name for print to file


(Firefox :: General, enhancement)

Not set



Firefox 55
Tracking Status
firefox55 --- fixed


(Reporter: lochang, Assigned: lochang)




(1 file, 1 obsolete file)

It is more user friendly to use document name as default file name when printing to file. Therefore, we should set the title name to document name, otherwise we will use whole URL as default file name.
Group: mozilla-employee-confidential
Assignee: nobody → lochang
Comment on attachment 8865761 [details]
[PATCH] Bug 1346682 - Set title to document name for print to file.

Hi Louis,

Please kindly help double check whether we should follow the UX of pdf.js or we can make our own decision to use the file name as the default name.
Attachment #8865761 - Flags: review?(brsun)
Hi Vance,

On Mac:
As comment 3, do we have to follow the default naming rule of pdf.js when print to file or download file on full page pdf [1] or we could make our own decision? Could you please help find the right person for the question?

[1] On embed pdf e.g., the behavior of print to file or download file on pdf.js would use the default name "document". But we can actually extract the correct url of the pdf and print or save to file with xxx.pdf as default name. It seems to me that this is more user friendly. Are we able to implement it this way, or we should follow the pdf.js?
Flags: needinfo?(vchen)
Hi Cindy,

Could you chime-in from PM's perspective? I think it is more user-friendly if we extract the correct pdf file name from the url and use it. It's much better than save everything as "document.pdf".
Flags: needinfo?(vchen) → needinfo?(chsiang)
hi vance, agreed with you there. think it's more user friendly to get the file name when we can.
Flags: needinfo?(chsiang)
Hi Bruce,

Would you please review the patch again, thanks.

It seems we are able to decide the file name by our own. So in the patch, I set the title name to pdf file name including embed pdf case.
Comment on attachment 8870707 [details]
Bug 1346682 - Set title to document name for print to file.


Please help to file another bug to solve the similar issue of embedded pdf for "ppapipdf.js:save" as well.
Attachment #8870707 - Flags: review?(brsun) → review+
Attachment #8865761 - Attachment is obsolete: true
Keywords: checkin-needed
Pushed by
Set title to document name for print to file. r=brsun
Keywords: checkin-needed
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.