Print PDF document from C#

  • Thread starter Thread starter Soumya Kar
  • Start date Start date
S

Soumya Kar

Hi All,

My requirement is to be able to print a pdf document without
the printer dialog being invoked. This I have achieved by using the
shell and passing the verb = "Print". But a part of the requirement is
also that before the document is sent for printing, the network printer
will have to be configured by C# code. The printer settings will have to
be modified in terms of page size, orientaion, default tray selection,
so on. Can anyone give me any idea on how to achieve this using C# code.

Thanks.
 
Soumya,

You might want to get a third party PDF control for this. When you send
the command verb Print, the os sends that to the program registered to
handle the command (most likely adobe). I don't know what other command
verbs they accept, or if they have an automation interface, but it is
unlikely that it would be that simple to set the print parameters.

I would check to see if Acrobat has an interface you can use (through
API calls or COM), or use a third party component.

Hope this helps.
 
Back
Top