By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

Set default printer's settings

P: n/a
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.
Oct 15 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Oct 15, 3:44*am, nano2k <adrian.rot...@ikonsoft.rowrote:
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
Oct 15 '08 #2

P: n/a
On 15 Oct, 15:49, raylopez99 <raylope...@yahoo.comwrote:
On Oct 15, 3:44*am, nano2k <adrian.rot...@ikonsoft.rowrote:


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- 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.
Oct 15 '08 #3

P: n/a
nano2k wrote:
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...r_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
Oct 15 '08 #4

P: n/a
On 15 Oct, 20:35, Tim Sprout <t...@ptialaska.netwrote:
nano2k wrote:
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...r_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/default...NoWebContent=1

It also seems to work with network printers.
Oct 15 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.