PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllIPDFDocument3 interface categories:
|
| interface IPDFDocument3 |
Example
How to use IPDFDocument3 interface
Delphi
[copy to clipboard]
{ Select menu Project -> Import Type Library
Find "PDFCreatorPilot Type Library (Version 1.0)".
Import this type library.
Add PDFCreatorPilotLib_TLB in the "uses" section.
Add line:
PDF: TPDFDocument3;
in the "var" section.
}
PDF := TPDFDocument3.Create(nil);
PDF.StartEngine('demo@demo', 'demo');
{ now PDF object is ready to use }
{ something else goes here... }
PDF.Destroy;
C/C++
[copy to clipboard]
/*
PDFCreatorPilot must be installed in the system.
(regsvr32 PDFCreatorPilot.dll)
*/
IPDFDocument3* PDF = NULL;
CLSID clsid;
HRESULT hr = CLSIDFromProgID(OLESTR("PDFCreatorPilot.PDFDocument3"), &clsid);
if(hr != S_OK)
{
// can't load. no such COM installed.
return;
}
hr = CoCreateInstance(clsid, 0, CLSCTX_ALL, __uuidof(IPDFDocument3), (LPVOID *)&PDF);
if(hr != S_OK)
{
// can't load. no such COM installed.
return;
}
PDF->StartEngine("demo@demo", "demo");
// now PDF object is ready to use
// something else goes here...
PDF->Release();
PDF = NULL;
C#
[copy to clipboard]
/*
PDFCreatorPilot must be added to project as reference
(in the COM tab page).
*/
PDFCreatorPilotLib.PDFDocument3Class pdf = new PDFCreatorPilotLib.PDFDocument3Class();
pdf.StartEngine("demo@demo", "demo");
// now PDF object is ready to use
// something else goes here...
pdf = null;
Visual Basic
[copy to clipboard]
' PDFCreatorPilot must be installed in the system.
' (regsvr32 PDFCreatorPilot.dll)
Set PDF = CreateObject("PDFCreatorPilot.PDFDocument3")
PDF.StartEngine "demo@demo", "demo"
' now PDF object is ready to use
' something else goes here...
Set PDF = nothing
See Also


