Bug in "Print to PDF" and "Print to XPS" in Windows 10? comma in filename results in zero-byte file

Has anybody else noticed that there is a problem in Windows 10 "Print to PDF" and "Print to XPS" that results in a zero-byte PDF/XPS file if output filename contains a comma.  If you don't have comma in the output filename the output is OK.  This appears to be a bug in the virtual printer, as the same problem appears to occur regardless of the application from which you try printing.  I have not checked to see if there are any other characters that cause the same glitch.

The "XPS Writer" in Windows 7 does not have this problem.

I have not verified if Windows 8 and 8.1 have this problem or not.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Hi Naoto,

Thank you for posting the query on Microsoft Community. I am glad to assist you on this.

Please answer these questions to get more clarity on this issue.

  1. What is the make and model of the computer?
  2. After upgrading to Windows 10, have you installed all pending updates and also updated all device drivers?

You may run the Printer troubleshooter and restart the computer to check.

  •  Press “Windows key + X” to click on “Control Panel”.
  • Click on “Troubleshooting” and click on “View all”.
  • Click on “Printer” to run the troubleshooter. Once this is done, restart the computer and check if this helps.

Thank You.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Computer is an Acer Aspire U5-620. which came with Windows 8.1 pre-installed and was upgraded to Windows 10.

Yes, all pending updates were installed before encountering problem.

Only suggestion that Printer troubleshooter had was to change the default printer -- no change in behavior (even after reboot).

Problem appears to be with virtual printer rather than application -- problem can be replicated in Notepad.

1. Open Notepad, add some text

2. Select File / Print

3. Choose "Microsoft Print to PDF" or "Microsoft XPS Document Writer"

4. on the Save As dialog, enter a name with no commas (e.g. "hello world")

5. Look in destination folder, the PDF or XPS is generated as expected

6. Repeat steps 3-4 but using destination filename with embedded comma (e.g. "hello,world")

7. Look in destination folder, the generated PDF or XPS is zero bytes in size.

------------------------------------------------

Addendum:  Problem occurs in clean-install Windows 10 (evaluation copy)

I was also able to repeat the problem with a clean-install Windows 10 (evaluation copy) on a different computer.  Again, all pending updates have been applied.  Same result as before, if comma is used in destination filename the file created is zero bytes in size.  Not having an embedded comma in destination filename will generate proper PDF and XPS files.

Addendum: Problem occurs in Windows 8.1 also.  Problem does not occur in Windows 7

Tried same test with computer running Windows 8.1 (all pending updates had been applied) -- the "Microsoft XPS Document Writer" in Windows 8.1 exhibits same problem -- embedded comma in destination filename results in creation of file zero-byte file (i.e. size is zero byes).  Generated file is OK as long as comma does not appear in destination filename.

Tried same test with computer running Windows 7 (tried with both Windows 7 Home and Windows 7 Ultimate editions) -- the problem does NOT occur with the "Microsoft XPS Document Writer" in Windows 7.

13 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Same problem here with the pdf writer on W10. However, I have never used a comma in a file name ever before!

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I did this and it is still not working/saving.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Confirmed: when the destination folder or filename has a comma in it, the resulting file is 0 bytes (NOTE: I put the "City, State" in the folder name for my travel expense records). If I change it to save the PDF or (O)XPS file to the "C:\temp" directory instead, everything works as expected.

Folder "C:\travel\20150914 - Huntsville, AL\" results in the 0-byte files for PDF and XPS export.

Folder "C:\travel\20150914\" works as expected.

Thanks for helping me find a workaround!

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you!  Had same problem.  When remove comma from filename it works.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Does this mean that it won't be fixed? 
What if we need a comma?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I print to PDF often and I have been frustrated by this bug.  Thank you for point out that it happens when there is comma in the name; that helps because i just tested it without comma and it saved okay.

I have noticed this problem whenever I try to print from Web browser using Microsoft Print to PDF.  The problem does not happen often if i am printing from Word and/or Excel.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

"Print as PDF" does not work with a comma, however selecting "Save as PDF" instead results in a pdf file with a comma in the name. (Both options are available as virtual printers in Windows 10 Home)

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Just recently ran into this issue and and a bit of searching, came across this thread. Just wanted to chime in that I'm also seeing this issue when trying to use Microsoft Print to PDF to a folder with a comma in it. PDF results in 0 byte size.

Someone also mentioned this doesnt happen in Excel or Word and thats not entirely true. While you can use "Save as" or "Export" as PDF to a folder or filename with a comma in it without issue, using Print > Microsoft Print to PDF still creates files with 0 byte size.

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated April 13, 2024 Views 14,504 Applies to: