Set default printer's settings

N

nano2k

Hello

I need to display and then automatically print a PDF file.
I'm using AxAcroPDF to display the PDF. AxAcroPDF class has a very
good method: printAll().
The only thing is that I need to print as landscape. AxAcroPDF doesn't
allow me to change the paper orientation (in fact doesn't support any
setting changing).

To workaround, I need to set the paper orientation of the default
printer to landscape, then (optionally) set it back.

How to do this?

I'm using .NET 2.0 (VS2005).

Thanks.
 
R

raylopez99

Hello

I need to display and then automatically print a PDF file.
I'm using AxAcroPDF to display the PDF. AxAcroPDF class has a very
good method: printAll().
The only thing is that I need to print as landscape. AxAcroPDF doesn't
allow me to change the paper orientation (in fact doesn't support any
setting changing).

To workaround, I need to set the paper orientation of the default
printer to landscape, then (optionally) set it back.

How to do this?

I'm using .NET 2.0 (VS2005).

Thanks.

I think you're screwed. As I recall the Print stuff from within C#
works with whatever API that comes with your print driver--so, for
example, if your print driver does not support landscape, well nothing
you can do about it, short of entirely rewriting the third party print
driver.

At least that was my impression last I did some stuff with the print
functions in C#.

RL
 
N

nano2k

I think you're screwed.  As I recall the Print stuff from within C#
works with whatever API that comes with your print driver--so, for
example, if your print driver does not support landscape, well nothing
you can do about it, short of entirely rewriting the third party print
driver.

At least that was my impression last I did some stuff with the print
functions in C#.

RL- Ascunde citatul -

- Afiºare text în citat -

Hi

Landscape is supported on almost every current drivers. That would not
be a problem.
Given the nature of the application, I can even consider a single type
of printer. But I would like a general solution as landscape
orientation should be a normal feature.

Thanks.
 
T

Tim Sprout

nano2k said:
Hello

I need to display and then automatically print a PDF file.
I'm using AxAcroPDF to display the PDF. AxAcroPDF class has a very
good method: printAll().
The only thing is that I need to print as landscape. AxAcroPDF doesn't
allow me to change the paper orientation (in fact doesn't support any
setting changing).

To workaround, I need to set the paper orientation of the default
printer to landscape, then (optionally) set it back.

How to do this?

I'm using .NET 2.0 (VS2005).

Thanks.

I used the code found at:

http://www.codeproject.com/KB/dotnet/NET_Printer_Library.aspx

This does not work for network printers where I am, though for some it
apparently works. See the forum comments at the end of the article.

I use the workaround for network printing found at:

MSDN Article ID : 230743 HOWTO: Set Duplex Printing for Word Automation

found at:

http://tinyurl.com/wgi4


-Tim Sprout
 
N

nano2k

I used the code found at:

http://www.codeproject.com/KB/dotnet/NET_Printer_Library.aspx

This does not work for network printers where I am, though for some it
apparently works. See the forum comments at the end of the article.

I use the workaround for network printing found at:

MSDN Article ID : 230743 HOWTO: Set Duplex Printing for Word Automation

found at:

http://tinyurl.com/wgi4

-Tim Sprout- Ascunde citatul -

- Afiºare text în citat -

Thanks for your reply.
I found the solution for me here:

http://support.microsoft.com/defaul...port/kb/articles/q140/2/85.asp&NoWebContent=1

It also seems to work with network printers.
 

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