About wPDF

Create PDF files from your Delphi or C++Builder applications.

wPDF is a PDF maker which is optimized for greater compatibility with most drawing commands commonly found in Windows applications. Used alone, with your own component or linked with WPTools, wPDF instantly creates PDF files. wPDF is compatible with WPTools, WPForm, QuickReport and HTMLView, to name just a few possibilities. This component provides you with a compatible 'canvas' property which you can use for direct drawing.

Overview

wPDF converts enhanced metafiles to PDF while preserving the vector and text information. This results in small PDF files which can be printed at high resolution, thus making wPDF superior to other solutions which convert embedded metafiles into bitmaps. wPDF supports the usual PDF features, including compression and 128 bit encryption and it was the first Delphi library to allow embedding of font subsets to reduce file size even further.

Code

The code needed for to create a PDF file is very similar to that needed for printing:

const Resolution = 72;

WPPDFPrinter1.BeginDoc; // Starts a new document

try

WPPDFPrinter1.StartPage( // start a page of a certain page

Round(8.5*Resolution), 5*Resolution, Resolution, Resolution, 0);

DrawPage(WPPDFPrinter1.Canvas); // subprocedure to draw to the TCanvas

WPPDFPrinter1.EndPage; // close the page

finally

WPPDFPrinter1.EndDoc; // close the document

end;

If you are using WPTools file creation can be done with just one line of code:

WPPDFExport1.Print;

Even though the export functions quickly, there's nothing missing from wPDF. Compression, encryption, embedded fonts, charsets (eastern European, Greek and Cyrillic) are all supported. Thumbnails can be created and you can add code to create outlines and hyperlinks. Graphics can be embedded using deflate or JPEG compression.