Hi.
I found a problem in TCairoPsCanvas integration process.
In TCairoPsCanvas.BeginDoc I nedd to know OutputFileName (1),
but this is inicialized later in TCUPSPrinter.DoBeginDoc (2).
procedure TPrinter.BeginDoc;
begin
...
if not FRawMode then begin
Canvas.Refresh;
TPrinterCanvas(Canvas).BeginDoc; //<-- 1
end;
//Call the specifique Begindoc
DoBeginDoc; //<-- 2
...
end;
I think, that logically sould be printer started (DoBeginDoc) before call
Canvas.BeginDoc. Thus I would like to swap calling order:
procedure TPrinter.BeginDoc;
begin
...
//Call the specifique Begindoc
DoBeginDoc;
if not FRawMode then begin
Canvas.Refresh;
TPrinterCanvas(Canvas).BeginDoc;
end;
...
end;
But I do not know if it will not cause some problems in other printer
implementations.
If order swaping will be refused, I have another but dirty solution.
Petr
--
Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223 Czech Republic (Eastern Europe)
fax: +420 466510709
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus