473,661 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printer PageSetupDialog PageSettings not being initialized for AdobePDF?

My C# app. apparently has problems with PageSettings not being
initialized properly after calling PageSetupDialog . If a user selects a
non-default printer from PageSetupDialog , the PageSize is apparently
not-initialized properly. It appears to be printing to a very small
page size and only prints a small piece of each page. Alternatively, if
if a user selects the new printer, then user selects the paper size from
the printer properties, it works.
Steps to Reproduce Problem
--------------------------
1 - Open PageSetupDialog
2 - Click Printer button and a secondary Page Setup dialog displays
3 - Select the non-default printer Adobe PDF from the secondary Page
Setup dialog
4 - Back-out and close both dialogs by pressing OK
5 - Verify printed page size not correct after calling PrintDocument.P rint
Work-Around
-----------

Re-select Letter Page Size from the Printer properties rather than
PageSetupDialog

1 - Open PageSetupDialog
2- Click Printer button and a secondary Page Setup dialog displays
3 - Select the non-default printer Adobe PDF from the secondary Page
Setup dialog
4 - Click Properties button on the secondary Page Setup dialog
5 - Click OK button without changing any settings on the secondary Page
Setup dialog
6 - Back-out and close both dialogs by pressing OK
7 - Verify printed page size is correct after calling PrintDocument.P rint
Thanks in advance for any tips on PageSettings and using PageSetupDialog .

-Ed Sutton
no************@ engius.com
Aug 22 '06 #1
1 4825
I found NET 1.1 bug reports concerning the use of metric margins with
PageSetupDialog . While I am using NET 1.1, I am not using metric.

-Ed

Ed Sutton wrote:
My C# app. apparently has problems with PageSettings not being
initialized properly after calling PageSetupDialog . If a user selects a
non-default printer from PageSetupDialog , the PageSize is apparently
not-initialized properly. It appears to be printing to a very small
page size and only prints a small piece of each page. Alternatively, if
if a user selects the new printer, then user selects the paper size from
the printer properties, it works.
Steps to Reproduce Problem
--------------------------
1 - Open PageSetupDialog
2 - Click Printer button and a secondary Page Setup dialog displays
3 - Select the non-default printer Adobe PDF from the secondary Page
Setup dialog
4 - Back-out and close both dialogs by pressing OK
5 - Verify printed page size not correct after calling PrintDocument.P rint
Work-Around
-----------

Re-select Letter Page Size from the Printer properties rather than
PageSetupDialog

1 - Open PageSetupDialog
2- Click Printer button and a secondary Page Setup dialog displays
3 - Select the non-default printer Adobe PDF from the secondary Page
Setup dialog
4 - Click Properties button on the secondary Page Setup dialog
5 - Click OK button without changing any settings on the secondary Page
Setup dialog
6 - Back-out and close both dialogs by pressing OK
7 - Verify printed page size is correct after calling PrintDocument.P rint
Thanks in advance for any tips on PageSettings and using PageSetupDialog .

-Ed Sutton
no************@ engius.com
Aug 22 '06 #2

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

Similar topics

0
3247
by: Tessa | last post by:
Is there any security reason why you cannot print to a network printer from ASP.NET under IIS6 on Windows 2003 server? I'm using ASP.NET code to print to a server print queue using PrintDocument.Print() (.NET framework v 1.1) I can print to a local printer plugged into LPT1 on the web server, but not to a network printer. The same printing code to a network printer works in a .NET web app when
0
1173
by: Andy Sze | last post by:
Visual Studio.net 2003 no yet fix the PageSetupDialog bug. http://support.microsoft.com/?id=814355 Here is my new solution: Private Sub btnPageSetup_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnPageSetup.Click '--- If Microsoft fix the bug should be: 'PageSetupDialog1.PageSettings = PrintPageSettings
2
4878
by: Amjad | last post by:
I use the PageSetupDialog box to allow the user to change the page margins before printing. The problem is when I open the dialog box and type in margin values in millimeters (as it says in the group border title), click on the OK button, and then open the dialog box again, I find that all the margin values were divided by 2.54. Basically, every time I open that Dialog box and click on OK, all the margin values get divided by 2.54. I...
0
1449
by: hamil | last post by:
I have a graphic file demo program that almost works. My form has a PageSetupDialog, PrintPreview, PrintDialog, and a PrintDocument control. Sample code follows. Now here is the quesion. When I open the PrintDialog control, there is a dropdown to select a printer from the list of available printers. However, the PageSetupDialog sets the properties of the "selected" printer. How do I find and select one of the available printers so I...
1
3899
by: Ratan | last post by:
Hello, I am using PageSetupDialog in my application to change the pagesettings of the document but i dont want to show all the page size to the user, I want to show only A3 and A4 size for selection in papersize dropdown. Is it possible to customize this option?? /Ratan
4
7776
by: c_shah | last post by:
How to change and set default printer using Visual Basic 2005 The following works within my VB 2005 application but does any one have better alternative. /**** Dim wshnetwork As Object = CreateObject("WScript.Network") Dim printerpath As Object = "TIFF Image Printer 7.0" wshnetwork.SetDefaultPrinter(printerpath) **/
0
1617
by: Fabio | last post by:
Hi all! I have some problems with the PrintDocument under Fw 1.1. I create a new document pd = new PrintDocument And it seems that the pd.PrinterSettings are the ones defined by the default printer.
0
1885
by: ppeterkin | last post by:
I customized a PrintPreviewDialog by adding a button to it's toolstrip that opens up a PageSetupDialog. The problem is changes made to the page setup are not passed to the PrintPreviewDialog until I close and reload it. How do I enable these changes to immediately show up in the print preview. See Code Below. Paul Private Sub ToolStripMenuItem2_Click(ByVal sender As System.Object,
0
1131
by: ywscr | last post by:
Hello, I am using PageSetupDialog in my application to change the pagesettings of the document,I changed PaperSize To "A4" in PageSetupDialog ,But it's result PaperSize no change ??I want Set PaperSize in PageSetupDialog And result OK; source code: private void button2_Click(object sender, EventArgs e) { pd = new PrintDocument(); PageSetupDialog mPS = new PageSetupDialog(); foreach...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.