VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1234[5]678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 18:07:50 10/04/02 Fri
Author: Michel
Subject: Re: Printer setup
In reply to: Jean-Michel Gaudette 's message, "Printer setup" on 15:04:46 10/04/02 Fri


Bonjour Jean-Michel,

I believe this is fairly tricking to do. Want you want to do is change the paper size. Unfortunately Delphi does not expose this properties in TPrinter.

I remember doing this a long time ago. This can only be done with some windows api calls. Lookup

GetPrinter, SetPrinter, PRINTER_INFO_2 structure.

The PRINTER_INFO_2 record has a field called pDevMode of type and pDevMove^ has a field called dmPaperSize. This needs to be set to DMPAPER_LEDGER for 17x11.

The windows help files says:

To modify the current printer settings, an application should call GetPrinter to retrieve the current settings into a PRINTER_INFO_2 structure, modify the members of that structure as necessary, and then call the SetPrinter function.

Hope this helps,

Michel


>I need to setup my printer after i setup my
>GraphicPrinter.
>
>How can i setup my printer in Delphi without the use
>of PrintDialog1.Execute.
>
>if i need to setup my GraphicPrinter like this
> GraphicPrinter.Width := 17;
> GraphicPrinter.Height := 11;
> GraphicPrinter.Print(Graphic);
>
>and after my Printer driver....
>
>How can i do this in Delphi
>
>Thanks..

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.