Closed Bug 1346682 Opened 6 years ago Closed 6 years ago
[jsplugins] Set title to document name for print to file
59 bytes, text/x-review-board-request
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.
Assignee: nobody → lochang
Status: NEW → ASSIGNED
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  or we could make our own decision? Could you please help find the right person for the question?  On embed pdf e.g. https://msu.edu/~urban/sme865/resources/embedded_pdf.html, 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?
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.
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. https://reviewboard.mozilla.org/r/137406/#review145844 LGTM. 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
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/17fe3f7820bd Set title to document name for print to file. r=brsun
You need to log in before you can comment on or make changes to this bug.