Custom Page Size (Printing)
Gary Harpin <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I am trying to make two printers (different make/model) use a custom page size. I have tried the code bellow (cut down for brevity). On one of the printers, the code works and the resulting document is printed on the correct size paper, the other seems to want to use A4 size. I have popped up a message box just before calling Print with the contends of prnDoc.DefaultPageSettings.ToString(), this shows the custom page size settings are there. Am I missing something, or is there a better way to do this?
-- code -------------
PrintDocument prnDoc = new PrintDocument();
prnDoc.PrinterSettings.PrinterName = prnName;
prnDoc.DefaultPageSettings.PaperSize = new PaperSize("Custom page size.", 500, 900);
prnDoc.PrintPage += new PrintPageEventHandler(OnPrintPage);
prnDoc.Print();
---------------------
Thank you.
Regards,
Gary Harpin
________________________________________
The other day upon the stair, I saw a man who wasn't there. He wasn't there again today, I think he's from the CIA.
Signam Ltd.,Harris Road, Warwick, England. CV34 5FY.
Tel: +44 (0)1926 417300 Fax: +44 (0)1926 417333
www.signam.co.uk www.sportsmark.co.uk
--------------------------------------------------------
Company registered in England, number 1972268
This message (and any associated files) is intended only for the use of the individual or entity to which it is addressed and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored.
Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com