C++ Builder Notes

Top  Previous  Next

You can use wPDF within C++Builder very similar to the usage in Delphi. The only difference is the way procedures and properties are addressed. In C++Builder you use '->' instead of '.'. Methods which do not require any parameters require at least a empty pair of parentheses ().

 

Example:

 

Create a PDF file from a TImage with a loaded metafile:

 

 WPPDFPrinter1->AutoLaunch = true;

 WPPDFPrinter1->Filename = Edit1->Text;

 WPPDFPrinter1->BeginDoc();

 WPPDFPrinter1->DrawTGraphic(0,0,0,0,Image1->Picture->Graphic);

 WPPDFPrinter1->EndDoc();

 

Execute the property dialog:

 

 WPPDFProperties1->Execute();