pdf printing

B

Bob Allen

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;
 
T

Tim Sprout

Bob Allen said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top