From: "Nick Ryan" Subject: Re: D1 printing problem: incorrect font sizes Date: 14 Jul 1999 00:00:00 GMT Message-ID: <7mi4cp$2ot9@forums.borland.com> References: <378C94B3.DFDF6FEB@bergsoft.de> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.delphi.winapi,borland.public.delphi.objectpascal Daniel Berg (Berg Soft) wrote in message news:378C94B3.DFDF6FEB@bergsoft.de... > Hi there, > > I've got the following the following problem using D1 (on D2 and later > the problem does not occur) > > > I can select different printers with different resolutions from the > printdialog. > Printing to any printer works fine when the prog just started (i.e: > Printing to Printer1, then shutdown prog, run again, then print to > Printer 2 works perfect). > > Printing to a second printer AFTER printing to a first printer scales > all fonts by > > Resolution(Printer1)/resolution(Printer2); > > I have already tried the following without success: > > - Creation of the form that uses the printers unit at runtime AFTER > printdialog.execute to create a new printer instance everytime > > - I have checked printers resolution with GetDeviceCaps: printer > change is recognized correctly. > > Does anyone has an idea of whats wrong? It's some weird bug in Delphi's TPrinter that causes information to be retained from a previous print session. (It affects the line thickness of printing using D3). The following code forces a complete refresh of the Printer object in D3 - it *should* work in D1 as well... procedure ResetTPrinter; var APrinter:TPrinter; begin if (not Printer.Printing) then begin APrinter := SetPrinter(NIL); if (APrinter <> NIL) then APrinter.Free; end; {if} end; Nick