While saving a file (like .docx or image) as PDF, its filename contains original file extension. |
|||||||||
Issue descriptionChrome OS: 10176.41.0, 64.0.3282.79 beta channel on caroline, eve devices. What steps will reproduce the problem? (1) Open Files app and open any .docx or .pptx or any image file. (2) Select Print option and click on Save option to save the file in PDF format. (3) In the "Save file as" dialog option, observe the highlighted portion in the filename field ( i.e. beside SAVE and CANCEL buttons). What happens instead? The highlighted text contains the original filename with its extension. i.e. Clicking on SAVE button, causes the file to saved as PDF like eg.'filename.docx.pdf' Please refer the screenshots for expected and actual behaviors.
,
Jan 9 2018
Print preview decides the file names of generated PDF files. thestig@, could you triage this one?
,
Jan 10 2018
Did this regress? If not, it might be a bit late to fix this for M64.
,
Jan 10 2018
i.e. Did Chrome 63 work ok? Maybe I caused this while trying to fix bug 375330 and bug 782041 .
,
Jan 10 2018
,
Jan 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/950aafdb7eed0d5bfa02237e414fe4f73db713ad commit 950aafdb7eed0d5bfa02237e414fe4f73db713ad Author: Lei Zhang <thestig@chromium.org> Date: Fri Jan 12 20:47:08 2018 Add more PdfPrinterHandlerTests. Expose tested logic as PdfPrinterHandler::GetFileName(). BUG= 800147 Change-Id: I12d703b79cb89c8b9bbd48024f3647bdd7c04898 Reviewed-on: https://chromium-review.googlesource.com/861198 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#529055} [modify] https://crrev.com/950aafdb7eed0d5bfa02237e414fe4f73db713ad/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc [modify] https://crrev.com/950aafdb7eed0d5bfa02237e414fe4f73db713ad/chrome/browser/ui/webui/print_preview/pdf_printer_handler.h [modify] https://crrev.com/950aafdb7eed0d5bfa02237e414fe4f73db713ad/chrome/browser/ui/webui/print_preview/pdf_printer_handler_unittest.cc
,
Jan 13 2018
I can fix the case of: file:///path/to/test.png. Currently in M64 it suggests something like "test.png (420×150).pdf" but in M63 it suggested test.pdf. I can't actually fix the "filename.docx.pdf" case, because "filename.docx" is the title of the document and not the URL. We can't distinguish "filename.docx" from a title of "what does this even.mean" from bug 375330 . The previous behavior just got lucky. Also, having "filename.docx.pdf" is consistent with the save dialog, which suggests "filename.docx.mhtml" for the same .docx file.
,
Jan 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f22c90913f3694c5963528f448d4a2325b29f414 commit f22c90913f3694c5963528f448d4a2325b29f414 Author: Lei Zhang <thestig@chromium.org> Date: Wed Jan 17 00:51:21 2018 Make PdfPrinterHandler more consistent with downloads. Offer better suggestions for file:///path/to/foo.png, and for webpages without titles. BUG= 800147 Change-Id: I1ad39dd98376aac3e1772da79138c694903d8f93 Reviewed-on: https://chromium-review.googlesource.com/865941 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#529532} [modify] https://crrev.com/f22c90913f3694c5963528f448d4a2325b29f414/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc [modify] https://crrev.com/f22c90913f3694c5963528f448d4a2325b29f414/chrome/browser/ui/webui/print_preview/pdf_printer_handler.h [modify] https://crrev.com/f22c90913f3694c5963528f448d4a2325b29f414/chrome/browser/ui/webui/print_preview/pdf_printer_handler_unittest.cc
,
Jan 17 2018
As mentioned in comment 7, the original reported bug is not fixable. The best we can do is make Print Preview's Save As PDF consistent with Save As. (ctrl + s) For the file:///path/to/test.png scenario, https://upload.wikimedia.org/wikipedia/commons/d/d9/Test.png is another example that can be used on any platform non-mobile platforms to verify what r529532 actually fixed.
,
Jan 17 2018
I tested 65.0.3323.0 canary with the PNG file in comment 9 and it works as expected.
,
Jan 17 2018
This bug requires manual review: We are only 5 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 18 2018
Thanks thestig@ - can you please comment on why this is critical? We're only few days away from stable. Has this been well tested and what are the implications if we fix this in M65?
,
Jan 18 2018
It's not a critical regression, but it would be annoying for affected users for the duration of the M64 release.
,
Jan 19 2018
how widespread is this issue? how many users does it impact?
,
Jan 19 2018
You can look at the PrintPreview.UserAction UMA histogram for actual usage data. The most common action from Print Preview is to print to a printer. Saving to PDF is the second most common action, but still a fraction of actual printing. The fix to merge is well contained and only affects the Save to PDF filename suggestion. There are no stability risks and the fix is backed up by unit tests.
,
Jan 19 2018
Great thanks for confirming. Approving merge for M64. Branch:3282
,
Jan 20 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48940713d488759c503b76629b25fbedbda88aa7 commit 48940713d488759c503b76629b25fbedbda88aa7 Author: Lei Zhang <thestig@chromium.org> Date: Sat Jan 20 05:45:38 2018 M64: Make PdfPrinterHandler more consistent with downloads. Offer better suggestions for file:///path/to/foo.png, and for webpages without titles. This is a manual merge of the non-test portion of r529055 and r529532. TBR=rbpotter@chromium.org BUG= 800147 Change-Id: I031eff53a60c6ac6f2fe8b4ad725c6e90e7ae969 Reviewed-on: https://chromium-review.googlesource.com/877621 Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/branch-heads/3282@{#559} Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840} [modify] https://crrev.com/48940713d488759c503b76629b25fbedbda88aa7/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc [modify] https://crrev.com/48940713d488759c503b76629b25fbedbda88aa7/chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
,
Jan 23 2018
Verified the fix on Mac 10.12.6, Win-10 and Ubuntu 14.04 using Chrome Beta version #64.0.3282.113 as per the comment# 16 Attaching screen shot for reference. Observed that "saving a file as pdf doesn't contain original file extension" i.e., iphone.jpeg got saved as iphone.pdf when clicked on save as PDF from print window Hence, the fix is working as expected. Adding the verified labels. Thanks...!!
,
Jan 23 2018
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by weifangsun@chromium.org
, Jan 9 2018Status: Assigned (was: Untriaged)