Customer Login Forum Online Help Open Source Deutsche Version

Report Engine and PDF Library: Example code for PowerBASIC

This example program is using the VPE Report Engine DLL.

With the function VpeOpenDoc() a new document is created and a handle for the document is returned. This handle is used in the following code, to access the document.

The function VpePicture inserts an image, four coordinates are supplied: (left, top, right, bottom). The parameter "VFREE" instructs VPE to compute the given coordinate for a text or image itself.

With VpeWriteDoc the document is written by the integrated PDF Library as PDF file, and finally the call to the function VpePreviewDoc shows the preview window.

Sub CreateDocument(ByVal hWndParent As Dword )
{
Local hReport As Dword
hReport = VpeOpenDoc(hWndParent, "Tutorial", 0)
VpePrint(hReport, 1.5, 1, "Hello World!")
VpePicture(hReport, 1.5, 2, %VFREE, %VFREE, "example.jpg")
VpeWriteDoc(hReport, "My Document.pdf")
VpePreviewDoc(hReport, ByVal 0, %VPE_SHOW_NORMAL)
End Sub

bullet Customer's Responses

"Just wanted to comment on how pleased I am with your product. ... Your product is about the only part of the project that has not proven to be "Interesting". Thanks for the help by giving me a good product."

Gary Coker, Principal Engineer, RG Research Inc.

More...