"Bob Allen" <bo*@greatsummits.comwrote:
i am looking for a way to print a pdf file to paper to a selected printer
and tray. does anyone know of a way to do this or a control that is
available to do such a thing. i have found a ton of ways to print to a pdf
but i just need to open up a pdf and print it and i can't seem to find a
way
to do this. i was using the command line in adobe to do this but they have
taken it away in the recent versions.
Bob;
Adobe Acrobat 8.1 SDK is now free to download:
http://www.adobe.com/devnet/acrobat/
Acrobat 8 uses OLE to print. See sample named "BasicIacCS".
Something like this works for me:
CAcroAVDoc avDoc = new AcroAVDocClass();
avDoc.Open(string fileName);
avDoc.PrintPagesSilent(0, 0, 0, 0, 1);
Adobe Reader 8 uses DDE to print. The NDde library is nice from:
http://www.codeplex.com/ndde
I posted some C# code in the comments there that prints selected items from
a
DataGridView to pdf, tested on Acrobat 7, Acrobat 8, and Adobe Reader.
--Tim Sprout