printing on HP Laserjet 2600n

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
dka
Newbie
Newbie
Posts: 2
Joined: Mon Mar 08, 2004 5:00 am

printing on HP Laserjet 2600n

Post by dka » Mon Apr 02, 2007 9:53 am

Hello,
when I was try to print with delphi (ver 7) on my Laserjet 2600n
I get floating point overflow, (when execute printer.enddoc)
I was look for it in www and I found the follow workaround
///
procedure TForm1.Button1Click(Sender: TObject);
var Saved8087CW :word;
begin
PrintDialog1.Execute;
Printer.BeginDoc;
Printer.Canvas.TextOut(1,1,'qqqqqqqqqqqqqqqq');
Saved8087CW := Default8087CW;
Set8087CW($133F);
try
Printer.EndDoc;
finally
Set8087CW(Saved8087CW);
end;
///
I try it and it work.
I think you also take care of it in your code (when you call printer.enddoc)

I has also problem when I try to select the LaserJet 2600n from printer combo box in TeePreview form, I get the error "Printer selected is not valid"

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Apr 02, 2007 2:37 pm

Hi dka,
when I was try to print with delphi (ver 7) on my Laserjet 2600n
I get floating point overflow, (when execute printer.enddoc)
I was look for it in www and I found the follow workaround
///
procedure TForm1.Button1Click(Sender: TObject);
var Saved8087CW :word;
begin
PrintDialog1.Execute;
Printer.BeginDoc;
Printer.Canvas.TextOut(1,1,'qqqqqqqqqqqqqqqq');
Saved8087CW := Default8087CW;
Set8087CW($133F);
try
Printer.EndDoc;
finally
Set8087CW(Saved8087CW);
end;
///
I try it and it work.
I think you also take care of it in your code (when you call printer.enddoc)
Casually we also have the very same printer here and we have been able to reproduce the issue. We will investigate it and try to find a solution. We will get back to you when we have further news.


I has also problem when I try to select the LaserJet 2600n from printer combo box in TeePreview form, I get the error "Printer selected is not valid"


I can not reproduce the issue here using a TTreePreviewPanel. Which are are the exact steps I should follow to reproduce the issue here and which TeeChart version are you using?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

dka
Newbie
Newbie
Posts: 2
Joined: Mon Mar 08, 2004 5:00 am

Post by dka » Tue Apr 03, 2007 4:00 pm

Hi,
I use teechart pro 7.07.
>>I can not reproduce the issue here using a TTreePreviewPanel. Which are >>are the exact steps I should follow to reproduce the issue here and which >>TeeChart version are you using?
If you want to see first set as your default some other printer,
and then try to select LaserJet printer.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Apr 04, 2007 7:21 am

Hi dka,

Thanks for the information. I could reproduce this here too. I'll get back to you when we have further news on the issue.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Apr 05, 2007 3:04 pm

Hi dka,

I have implemented the enhancement you suggested in TeeChart v7 and v8 sources and works fine here now.

The printer selection issue (TV52012159) hasn't been fixed yet.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

David Berneda
Site Admin
Site Admin
Posts: 83
Joined: Wed Nov 12, 2003 5:00 am
Location: Girona, Catalonia
Contact:

Post by David Berneda » Tue Apr 10, 2007 11:28 am

A workaround you can try is to add one unit to "uses" clause:

uses
OpenGL;

This unit is already setting the 8087 fpu mask exclude-exception bits, at the unit initialization, so it might help solve the printing exception.

(The Microsoft Windows OpenGL32.dll already "suffers" from masking floating exceptions, that's why Borland/CodeGear already added the fix to their own OpenGL.pas unit)

regards
david

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 10, 2007 12:05 pm

Hi dka,

As a follow up to David's post, I've removed the solution you suggested from TeeChart's sources as this exception is already trapped by OpenGL and TeeOpenGL units. Also, masking the exception could create us additional problems.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply