How to use

Top  Previous  Next

It is very easy to use the wPDF Source code. Simply copy the provided files in the same directory the units WPPDFR1.PAS etc reside.

 

Please open the file wpdf_inc.inc and make sure the define {$DEFINE WPDF_SOURCE} is active.

 

In your projects please add a

 

{$ wpdf_inc.inc} right at the beginning.

 

Now modify the uses clause to use the unit WPPDFR1_src, WPGenDC and WPPdfDC if the compiler symbol WPDF_SOURCE is defined:

 

{$I wpdf_inc.inc}

 

interface

 

uses

 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs

{$IFDEF WPDF_SOURCE} ,WPPDFR1_src, WPGenDc, WPPdfDC {$ELSE} ,WPPDFR1 {$ENDIF}

etc etc ...

 

 

If you are using the function WPDF_START() please also put it into a condition:

 

{$IFNDEF WPDF_SOURCE}

 WPDF_START( LIcenseName, LicenseCode );

{$ENDIF}

 

Now you can compile the project. You can pass the project source to anybody who has not licenses the wPDF source code and it will work with the DLL version the same as does with the source.

 

NEW: The option types are now defined in the PDF engine source files, not in the unit wppdfr1_src anymore.