PrintPreview: Bug in Printer Drivers

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

PrintPreview: Bug in Printer Drivers

Postby aram » April 30th, 2006, 10:16 am

Sorry. My english is not very good.
I'm using TPRINTPREVIEW 4.62 with Delphi 7 and i have added any new methods for easily works designing reports. Those methods works all in millimeters:

Procedure Line(Const X1,Y1,X2,Y2: Integer; width: integer; Style: TpenStyle);
*** DRAW A SIMPLE LINE FROM X1,Y1 TO X2,Y2 of WIDTH points


Procedure Rectangle(Const X1,Y1,X2,Y2: Integer; width: integer; Style: TBrushStyle; Shadow: boolean);
*** DRAW A RECTANGLE FROM X1,Y1 TO X2,Y2 of WIDTH points with STYLE, and with or without right and bottom border shadowed


Procedure TextOut(X, Y: integer; Text: String; fname: String;
fSize: byte; fStyle: TFontStyles ;fColor: TColor;
TAlign: TAlignment; Datos: Boolean; Column: Byte);

*** DRAW A TEXT FROM X, Y with Font Fname, with Size FSize and Style, Color and Alignment. Rest of parameter are not now in use. In future can me to exports reports to HTML or CSV, etc


Procedure TextOutWB(X, Y, X1, Y1: integer; Text: String; fname: String;
fSize: byte; fStyle: TFontStyles ;fColor: TColor);

*** DRAW A TEXT CLIPPED Between X,Y and X1,Y1 with Font, size, Style and Color...


I have encontered any problems with some printers drivers like HP Deskjet Color in USB (original hp drivers) in Windows 98 that leave the page in blank.

The Brother 730 laser printer installed in windows98 did not work fine too. They not draw fine background in BsClear rectangle.
Can you help me?
Are they any membre working in export reports from tprintpreview? i'm interested...
if you need source code of news methods, please, post me a reply.
Attachments
Preview.pas
(128.44 KiB) Downloaded 150 times
aram
Member
Member
 
Posts: 2
Joined: April 30th, 2006, 9:35 am

Postby Kambiz » April 30th, 2006, 10:55 am

Dear Aram,

There are many crappy printer drivers around.

Try to put the following lines of code in your functions, hope to fix the problem.

Code: Select all
SetBkColor(Canvas.Handle, RGB(255, 255, 255));
SetBkMode(Canvas.Handle, TRANSPARENT);
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby aram » April 30th, 2006, 4:26 pm

Thanks, i will try your solution...

Aram.
aram
Member
Member
 
Posts: 2
Joined: April 30th, 2006, 9:35 am


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 4 guests

cron