Page 1 of 1
printing on HP Laserjet 2600n
Posted: Mon Apr 02, 2007 9:53 am
by 9336084
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"
Posted: Mon Apr 02, 2007 2:37 pm
by narcis
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.
Posted: Tue Apr 03, 2007 4:00 pm
by 9336084
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.
Posted: Wed Apr 04, 2007 7:21 am
by narcis
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.
Posted: Thu Apr 05, 2007 3:04 pm
by narcis
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.
Posted: Tue Apr 10, 2007 11:28 am
by David
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
Posted: Tue Apr 10, 2007 12:05 pm
by narcis
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.