<< Click to Display Table of Contents >> Navigation: Installation > Delphi |
A) To register the component TWPViewPDF:
Please open the file WPViewPDF_pack.dpk / WPViewPDF_pack_XE.dproj for Delphi XE and later and click on "Install".
You find the "Install" menu entry when you click with the right mouse button on the WPViewPDF..BPL project in the project manager.
B) You can also create a component package yourself:
From Delphi Menu select File/New/Delphi Package
it will create a new empty BPL project
To this BPL you need to add the pascal unit WPViewPDF_reg.pas
and as required packages "designide" has to be added.
Now you can click on compile and install.
When you put a TWPViewPDF instance on your form, you can make sure it loads the correct DLL by modifying the global string variable
WPViewPDFDLLNAME
in either the initialization section or after program start, before the form will be created.
Please note: FormCreate sometimes comes after the creation of the window class.
initialization
WPViewPDFDLLNAME := ExtractFilePath(Application.EXEName) + 'wPDFView05.dll';
C) WPViewPDF can also used without installation into the IDE:
To do so add the units WPViewPDF3 and WPDF_ViewCommands to the project and create the component in code:
procedure TWPViewPDFDemo.FormCreate(Sender: TObject);
begin
WPViewPDF1 := TWPViewPDF.Create(Self);
WPViewPDF1.DLLName := dllname;
WPViewPDF1.ViewerStart('', your_lic_name, your_lic_key, your_lic_code);
WPViewPDF1.Parent := Self;
WPViewPDF1.Align := alClient;
WPViewPDF1.ViewControls := [wpHorzScrollBar, wpVertScrollBar];
WPViewPDF1.ViewOptions := WPViewPDF1.ViewOptions +
[wpExpandAllBookmarks, wpDontUseHyperlinks, wpSelectClickedPage, wpShowPageSelection, wpShowPageMultiSelection];
end;
For 64bit you need the DLLs wp_type1ttf64.dll and wPDFView...05x64.
The unit WPViewPDF4 includes the tools to create the GUI in code.
Important:
In case you decide to rename the DLL WPViewPDF05 ... do not choose a file name which contains "Demo04" or "Demo05".