Doing "Microsoft Print to PDF" "a error occurred while printing"
I found a solution to my problem, but I just wanted to make the problem/solution available to all FireFox users ... Doing "Microsoft Print to PDF" I was getting "a error occurred while printing". This error also occurred trying to do "Microsoft XPS Document Writer". Using "Process Monitor" (from Sysinternals) found "access denied" entry. This occurred even though I had total security access and ownership too. I had been using a non-default "tmp" user environment variable. I set "tmp" back to the default and the problem went away. The problem was not occurring in the other browsers IE, Edge, or Chrome. Also, reinstalling FireFox did not solve the problem since the "tmp" variable was not affected by the reinstall.
Solution choisie
Doing "Microsoft Print to PDF" (or "Microsoft XPS Document Writer") gets error message "An error occurred while printing" and file does not get created. This error can occur if the Windows "user" environment variable "TMP" has been changed from the default value. The changed value somehow seems to cause "access denied", but this specific reason for the error is not presented to you. A trace of the error occurring revealed this reason. This error does not occur using one of the other browsers IE, Edge, or Chrome. Changing the TMP variable back to the default (%userprofile%\appdata\local\temp) eliminates the error.
Lire cette réponse dans son contexte 👍 3Toutes les réponses (6)
Hello rnthorburn, thanks for sharing with us
Well done, it is great you can solve the issue, please take a moment and write your solution in a reply and mark that reply, YOUR reply as "solution chosen" to help other with similar problem. :-)
(google basically show firefox chosen solutions when you search something in firefox)
thank you :-)
Solution choisie
Doing "Microsoft Print to PDF" (or "Microsoft XPS Document Writer") gets error message "An error occurred while printing" and file does not get created. This error can occur if the Windows "user" environment variable "TMP" has been changed from the default value. The changed value somehow seems to cause "access denied", but this specific reason for the error is not presented to you. A trace of the error occurring revealed this reason. This error does not occur using one of the other browsers IE, Edge, or Chrome. Changing the TMP variable back to the default (%userprofile%\appdata\local\temp) eliminates the error.
I have this same problem printing, or rather not printing, .pdf files. I looked at the environment variables as suggested and they were already as you suggested. Any other suggestions are definitely welcome.
First off, I assume you have tried the general printer problem resolution steps - from simple to the most comprehensive.
Until I found a solution for mine, I downloaded and used the free CutePDF Writer.
If, in the long run, you wish to end up using Microsoft Print to PDF, then you'll have to find out what's causing "An error occurred while printing", or, if it's a bug in FireFox, wait for it to be fixed.
In my case, I created another user account and found the error did not occur using that one. If that's your case too, then you may be able to download and use the free Process Monitor (from Sysinternals) to trace the activity of printing from the user account where it fails and the user account where it works. Then compare the results to see where the error appears to occur and thus find the reason for "An error occurred while printing". This is not easy to do. Even if you make the trace window as small as possible there may be 10,000 entries of file and registry events, but Process Monitor does provide editing to help you analyze the data. Again, finding my solution was not easy for me, and that's why I posted it, to possibly be a solution for others.
Thank you for the quick reply. You are right to assume I've tried the complete range of troubleshooting that I've found. I plan to try what you've suggested. Appreciate the help.
Modifié le
What a joke. All I want to do is print a form I found on the internet. http://cdn.worksheetfun.com/wp-content/uploads/2016/02/wfun16_numberchart_1-50_T1_1.pdf I could do instantly with win 3.1
Now I can't print it "an error occurred while printing"? I saved it and now win 10 says it doesn't exist.
What happened to a print function that freaking does something.
I want to print this form. Interrogate the forms properties and do what is necessary to print it. Is it that difficult?