I am using Qt4.8, What I want is open a pdf and print that pdf automatically through cmd.exe, without clicking on print button in pdf reader by using QProcess:
I have two different code that do two different task: Opne Pdf
QString scmd= "cmd.exe";
list.push_back("/C");
list.push_back("test.pdf");
Process.start(scmd, list);
Sleep(2000);
Print pdf without open it
QString scmd2 = "C:/Program Files (x86)/Adobe/Reader 11.0/Reader/AcroRd32.exe.exe"
list2.push_back("/t");
list2.push_back("test.pdf");
Process.start(scmd2, list2);
Sleep(2000);
So I want to merge this command, I dont know how I can do that? Please suggest me something
You can fetch all information from HKEY_CLASSES_ROOT of windows registry.
Here is a example how to fetch default path to printing software and how to run it. I tested it on Qt 5.7