-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Printers
- LaserJet Printing
- Printing from C++ application

Create an account on the HP Community to personalize your profile and ask a question
02-24-2020 06:09 AM
I am trying to print from a C++ (MSVC) application. I see the document in the printer queue but it vanishes without printing as soon as EndDoc() is invoked.
Printing to PDF works. Also, I can print to the HP printer from Word or other applications.
The printer is a HP Envy 5030
The code previously worked on a Win 7 system
Maybe I need to install some driver? But which and how?
02-24-2020 07:15 AM
You should try asking around in a programming forum for advice on this one. We wont be able to assist you with any custom built apps. As long as the printer can print a test page from the printers and scanners area then you know the printer is installed correctly. Anything else after that is a compatibility issue between your custom app and the currently installed driver. Inkjets do not work well with Universal drivers so you are most likely limited to the current driver on HPs support website for your model and OS.
Here is a thread where some developers troubleshoot C++ printing issues:
https://stackoverflow.com/questions/14858262/stdcout-wont-print
You can always flip drivers around and try new ones. There is no harm in creating a 2nd test queue and play with whatever drivers you want. There is also no way to know what driver is compatible with your app without trial and error.
Experts are not HP Employees. Experts are advanced users, administrators, technicians, engineers or business partners who volunteer their time to answer community questions.
Please mark anything that is helpful with a Kudo.
When you are done troubleshooting, please mark one of the responses as the Solution.
This feedback enhances the community by helping future readers choose between multiple similar responses.