Earlier when I faced the error where QuickBooks Cannot Create PDF, I got in touch with an expert. They suggested me an effective solution to reinstall the XPS Writer -
Click on Start.
Press the Settings tab.
Select Control Panel and tap on Devices and Printers.
Click on the Microsoft XPS Document Writer icon and choose to Remove Device.
Confirm by hitting the Yes button.
Tap on “Add a Printer” and “Add a local printer or network print with manual settings.”
Move to the “Use an existing port” section and choose “PORTPROMPT: (Local Port).”
Click on Next.
In the Manufacturer list, click on Microsoft and Microsoft XPS Document Writer v4.
Go to the Printer Name field, and remove the v4 from Microsoft XPS Document Writer.
Tap on Finish.
As an alternate, you can also speak with the expert team available at 1-855-856-0042 to resolve QuickBooks Cannot Create PDF.