Well......there is the easiest way....you could simply use the system
(Assuming you are using windows)
Code:
#include <windows.h>
int WINAPI WinMain(HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
int nRes;
nRes = (int)ShellExecute(HWND_DESKTOP,"print",
lpszArgument,NULL,NULL,0);
if(nRes<32)
MessageBox(HWND_DESKTOP,"Could not print","ERROR",MB_OK);
return 0;
}
Compile as "PrintPDF" or whatever...
Use as a commandline
You will not see anything going to screen........but it should spit the document out of the printer.....
That's about the simplest and most effective way I can think of.