Well......there is the easiest way....you could simply use the system
(Assuming you are using windows)
Compile as "PrintPDF" or whatever...
int WINAPI WinMain(HINSTANCE hThisInstance,
nRes = (int)ShellExecute(HWND_DESKTOP,"print",
MessageBox(HWND_DESKTOP,"Could not print","ERROR",MB_OK);
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.