473,564 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Printer's default paper

Hi all,
I am trying to print a report in A4 paper, but my printer's default paper is
different (Letter 8.5 x 11 inches). So when i print, a significant part of
the paper remains blank, because of the different margins. Does anyone know
how to programmaticall y change the printer's default paper? Almost all
properties of the Printersettings Class on this matter are ReadOnly.

Thank u

Panos

Oct 4 '06 #1
3 2123
Panos wrote:
Hi all,
I am trying to print a report in A4 paper, but my printer's default paper is
different (Letter 8.5 x 11 inches). So when i print, a significant part of
the paper remains blank, because of the different margins. Does anyone know
how to programmaticall y change the printer's default paper? Almost all
properties of the Printersettings Class on this matter are ReadOnly.

Thank u

Panos
Take a look at -

DefaultPageSett ings.PaperSize. PaperName

or maybe consider showing the User a Dialog where they can select the size -

PrintDialog1.Sh owDialog()
or use the PageSetupDialog

or better still, if as you wrote it's your own printer, then change the
default through "Printers and Faxes" within your operating system and
you won't need to worry too much about it.

There are a number of ways to do it, but you didn't state which version
of Visual Studio you're using. The help within VS2005 provides a heap
of help, with complete code examples, for this topic.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Oct 4 '06 #2
I' ll try it.

Thank u Shane()


"ShaneO" wrote:
Panos wrote:
Hi all,
I am trying to print a report in A4 paper, but my printer's default paper is
different (Letter 8.5 x 11 inches). So when i print, a significant part of
the paper remains blank, because of the different margins. Does anyone know
how to programmaticall y change the printer's default paper? Almost all
properties of the Printersettings Class on this matter are ReadOnly.

Thank u

Panos
Take a look at -

DefaultPageSett ings.PaperSize. PaperName

or maybe consider showing the User a Dialog where they can select the size -

PrintDialog1.Sh owDialog()
or use the PageSetupDialog

or better still, if as you wrote it's your own printer, then change the
default through "Printers and Faxes" within your operating system and
you won't need to worry too much about it.

There are a number of ways to do it, but you didn't state which version
of Visual Studio you're using. The help within VS2005 provides a heap
of help, with complete code examples, for this topic.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Oct 5 '06 #3
Hi Shane()

I tried the code, but still no luck. When i set the PaperName property to a
papername other than the default, i get an exception, which says that i have
to set the Kind property to custom. But Kind property is ReadOnly.
Any ideas?

"ShaneO" wrote:
Panos wrote:
Hi all,
I am trying to print a report in A4 paper, but my printer's default paper is
different (Letter 8.5 x 11 inches). So when i print, a significant part of
the paper remains blank, because of the different margins. Does anyone know
how to programmaticall y change the printer's default paper? Almost all
properties of the Printersettings Class on this matter are ReadOnly.

Thank u

Panos
Take a look at -

DefaultPageSett ings.PaperSize. PaperName

or maybe consider showing the User a Dialog where they can select the size -

PrintDialog1.Sh owDialog()
or use the PageSetupDialog

or better still, if as you wrote it's your own printer, then change the
default through "Printers and Faxes" within your operating system and
you won't need to worry too much about it.

There are a number of ways to do it, but you didn't state which version
of Visual Studio you're using. The help within VS2005 provides a heap
of help, with complete code examples, for this topic.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Oct 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12151
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to know how will this affect a report rendered by a crystal viewer. I have a web page with a crystal viewer rendering the report on the page. I build...
0
1046
by: bafidi | last post by:
please hel i cant change the default printer papersiz can you show me an example for a4 paper siz and custom paper siz
0
1861
by: Anthony Nystrom | last post by:
I am having trouble with changing printer settings before I raise either the pagesetup dialog or the print preview dialog... Changing the printer name is easy, but I am also trying to change the paper size.... This particular paper size is 30386 Video Top is specific to the printer driver itself... Any sample code as to how to both change the...
3
8521
by: Rick R | last post by:
We need to change the paper size for the default printer before printing a PDF file from within a VB.Net application. printDocument printerSettings is not appropriate as there is no document to print. Any help is greately appreciated.
1
1643
by: tzinno | last post by:
I'm running an Access 2000 application on users' desktops as a runtime; the back-end is on a server. When the user prints an item (a Packing List), I have it coded to print 1 copy of a report to the default printer, and 1 copy of a different report to a specifically-selected printer. If the specific-destination printer is out of paper, the...
2
11070
by: ExitusLSU | last post by:
Is there a way to change the DEFAULT printer settings for an installed printer? I want it to change the printer settings for a specified printer at the whole OS/Windows level, not just for the application. Specifically, I need to change the default papersize for the printer for about 150 remote users. I've tried changing the paper size for...
0
942
by: Panos | last post by:
Hi all, I am still trying to print a report in A4 paper, but my printer's default paper is different (Letter 8.5 x 11 inches). So when i print, a significant part of the paper remains blank, because of the different margins. Does anyone know how to programmatically change the printer's default paper? When i set the...
6
9750
by: Ian | last post by:
I am trying to get MS Access 2000 to print names and addresses onto a Dymo 400 label printer, I have set the Access Report to automatically select the correct printer, then select the label size of “99012 Large Address”. This works fine but when I move my database to another PC (with identical Dymo printer and drivers) the report defaults...
3
4263
by: brianflannery | last post by:
Greetings all! My problem is this. I've installed a new printer on my computer. This is the "default printer" for access. Now, some of my reports, which were working fine with the old printer, are now showing up with an odd view (very enlarged) in preview. If I go to page setup, and choose specific printer to then look at the paper size...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.