You are not logged in.
Pages: 1
Hello
the getPdfOpject is...
procedure TfaStartf.createPdfObject;
begin
m_tpdf:=TPdfDocumentGDI.Create
end;
{------------------------------------------------}
function TfaStartf.getPdfObject:TPdfDocumentGDI;
begin
result:=m_tpdf
end;
Hello
MyProcedure has this paramters
destination: TCanvas;AusgabeNummer:Integer;ppdf:Boolean = false);
so, when ppdf is true then
I set destination to VCLCanvas.
My idea was something like this:
if ppdf then
destination :=getPdfObject.VCLCanvas;
Unfortunately it will be throw an access error.
Could someone help me?
Thanks,
loris
Thanks for fast answer
Now I reveive a pdf, empty unfortunately.
The parameter of dosome(...) is TCanvas -->procedure printPDF(destination: tcanvas;outputnr:Integer);
dosome(lPdf.VCLCanvas);
lPdf.SaveToFile('c:\hallo.pdf');
lpdf.Free;
Do you thinks there must happen something in the code, or...
Regards, merci bc
Thanks for the answer,
I made I interface with TCanvas, but how can I set canv
to PDFCanvas? Its necessary that I use tcanvas.
var
lPdf : TPdfDocumentGDI;
canv:TCanvas;
begin
lPdf := TPdfDocumentGDI.Create;
dosome(canv);
this is not going:
false
lPdf.Canvas:=canv; because property.
Could you help me witht a peace of code?
Thanks a lot
loris
Salut Arnaud,Hello
Is there any possibility to set PrinterCanvas or printerobject to SynPdf?
var
p:TPrinter;
lPdf : TPdfDocumentGDI;
begin
lPdf := TPdfDocumentGDI.Create;
p:=TPrinter.Create;
p.BeginDoc;
p.Canvas.TextOut(0,0,'Salut');
{--------------------------------}
lPdf.Canvas:=p.Canvas?
{--------------------------------}
OR
lPdf := TPdfDocumentGDI.Create(p);
{-----------------------------------------------------}
lpdf.SaveToFile('c:\cafaitplaisir.pdf');
lpdf.Free;
p.EndDoc;
p.Free;
end;
Because I've thousand of lines with the printercanvas, and I'could not change it so easy.
Regards,
Loris
Pages: 1