Windows Develop Bookmark and Share   
 index > Windows Forms General > Issue with PrintDialog and PostScript Custom Page Size
 

Issue with PrintDialog and PostScript Custom Page Size

In PrintDialog.ShowDialog dialog - user has option to select PostScript Custom Page Size as a print dimension, allowing custom entry of height and width.

This seems to be accepted for next print, but the next time Print Setup dialog is opened, printer selection is now seen set to "Letter". Can Print Setup persistently keep the PostScript option?

Same issue if I need to save the PostScript Custom Page size into the registry.
PrintDialog.Document.DefaultPageSettings.PaperSize will always return letter sizes and not the Custom Page Size defined by the user.

Michel Cunha
MCunha  Wednesday, January 02, 2008 7:04 PM
Zhi-Xin Ye  Monday, January 07, 2008 9:31 AM

Ok I found out how to display the last PostScript Custom Page Size next time Print Setup dialog is opened. I just have to setPaperSize kind and Name to PostScript custom

PaperSize pz = new PaperSize();

pz.RawKind = 32767;

pz.PaperName = "Dimension de papier personnalisée PostScript";

printDialog.Document.DefaultPageSettings.PaperSize = pz;

printDialog.Document.PrinterSettings.DefaultPageSettings.PaperSize = pz;

However I still dint find a way how to get/save the values (width/height) entered by the user in PostScript Custom Page Size.

PrintDialog.Document.DefaultPageSettings.PaperSize will always return letter sizes and not the Custom Page Size defined by the user.

Can anyone help me with this issue ?

Michel Cunha

MCunha  Thursday, January 03, 2008 2:57 PM
Zhi-Xin Ye  Monday, January 07, 2008 9:31 AM

You can use google to search for other answers

Custom Search

More Threads

• .NET control to use Active Directory Object Selection Dialog
• Loading a Grid Combo Box in a DataGridView.
• Update all labels based on an event
• How to know the web bowser control has been loaded fully
• MySQLDataAdapter Insert Not Working...
• Tiling children in MDI Parent space
• Bring to Front Form Problem
• Implement Drag and Drop in DataGridView
• Convert money value to text.
• Finding Memory Leakage in windows forms