#1 2015-07-07 11:19:48

loris
Member
Registered: 2014-02-23
Posts: 5

Casting TPdfDocumentGDI VCLCanvas/TCanvas

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

Offline

#2 2015-07-07 11:28:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Casting TPdfDocumentGDI VCLCanvas/TCanvas

What is a getPdfObject ?

Offline

#3 2015-07-07 11:42:05

loris
Member
Registered: 2014-02-23
Posts: 5

Re: Casting TPdfDocumentGDI VCLCanvas/TCanvas

Hello

the getPdfOpject is...

procedure TfaStartf.createPdfObject;
begin
m_tpdf:=TPdfDocumentGDI.Create

end;
{------------------------------------------------}

function TfaStartf.getPdfObject:TPdfDocumentGDI;
begin
result:=m_tpdf
end;

Offline

#4 2015-07-07 11:43:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Casting TPdfDocumentGDI VCLCanvas/TCanvas

You need to add a page to have canvas instance.

Offline

Board footer

Powered by FluxBB