



Collapse AllIPDFDocument4 interface categories:
| General document management | General methods and properties for working with a PDF document: | |
| Page Operations | Methods and properties for modifying the content of a PDF document: | |
| Images | Methods for image manipulation: | |
| Actions | Methods and properties for action management: | |
| Annotations | Methods and properties annotation and control management: | |
| Content Groups | Methods for optional content group management: | |
| Outlines | Methods for outline management: | |
| Patterns | Methods for pattern manipulation: | |
| Tables | Methods for manipulations with tables: | |
| Transparency | ethods for transparency management: | |
| Types used in IPDFDocument4 | PDF Creator uses not only standard types like double, int, and so on, but also defines some custom types. | |
| Compatibility | PDF Creator Pilot tries to generate PDF files that conform to PDF Reference version 1.3 (Acrobat 4.0). |
Syntax| interface IPDFDocument4 |
Example{ 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: TPDFDocument4;
in the "var" section.
}
PDF := TPDFDocument4.Create(nil);
PDF.SetLicenseData('demo@demo', 'demo');
{ now PDF object is ready to use }
{ something else goes here... }
PDF.SaveToFile('c:\test.pdf', false);
PDF.Destroy;
/*
PDFCreatorPilot must be installed in the system.
(regsvr32 PDFCreatorPilot.dll)
*/
IPDFDocument4* PDF = NULL;
CLSID clsid;
HRESULT hr = CLSIDFromProgID(OLESTR("PDFCreatorPilot.PDFDocument4"), &clsid);
if(hr != S_OK)
{
// can't load. no such COM installed.
return;
}
hr = CoCreateInstance(clsid, 0, CLSCTX_ALL, __uuidof(IPDFDocument4), (LPVOID *)&PDF);
if(hr != S_OK)
{
// can't load. no such COM installed.
return;
}
PDF->SetLicenseData("demo@demo", "demo");
// now PDF object is ready to use
// something else goes here...
PDF->SaveToFile("c:\\test.pdf", false);
PDF->Release();
PDF = NULL;
/*
PDFCreatorPilot must be added to project as reference
(in the COM tab page).
*/
PDFCreatorPilotLib.PDFDocument4Class pdf = new PDFCreatorPilotLib.PDFDocument4Class();
pdf.SetLicenseData("demo@demo", "demo");
// now PDF object is ready to use
// something else goes here...
pdf.SaveToFile(@"c:\test.pdf", false);
pdf = null;
' PDFCreatorPilot must be installed in the system.
' (regsvr32 PDFCreatorPilot.dll)
Set PDF = CreateObject("PDFCreatorPilot.PDFDocument4")
PDF.SetLicenseData "demo@demo", "demo"
' now PDF object is ready to use
' something else goes here...
PDF.SaveToFile "c:\test.pdf", False
Set PDF = nothing
See Also