TWPViewPDF Object

Properties Methods Events

Top  Previous  Next

Description

TWPViewPDF is a component to view and print PDF files created by wPDF and similar PDF creation engines. It has the ability to display text (using true type fonts) and graphics (JPEG, deflated RGB bitmaps, now also index RGB bitmaps) and also supports character sets.

 

Delphi:

Use this method to initialize the license

 WPPDFViewerStart(licensename, licensekey: string; licensecode: Integer);

alternatively the license codes can be set using:

 

CommandStr( 290, LicenseName + '=' + LicenseKey );

CommandEx( 1290, LicenseCode );

WPViewPDF PLUS

If you licensed WPViewPDF PLUS you can save a new PDF file from WPViewPDF. This feature can be used to remove pages from PDF files, to merge several PDF files into a new file and to remove or apply security features or set info record items.

The "plus" methods are available through interface Plus or the command ids 500 to 510.

Extract Text

WPViewPDF is able to extract the text of a page as ANSI text (GetPageText) and can find text in the loaded PDF data (FindText). WPViewPDF is also able to convert pages into metafiles or JPEG images.

 

  Command IDs:

  COMPDF_MakeEMF = 162; // strparm=  "nr=filename", example "1=c:\pageone.emf"

  COMPDF_MakePrinterEMF = 163; // Like  COMPDF_MakeEMF but uses the printer to create the reference DC

  COMPDF_MakeJPEGSetRes = 166; // Set the resolution for the created JPEG file, default is 72

  COMPDF_MakeJPEG =  167;  // Create JPEG file  strparm=  "nr=filename", example "1=c:\pageone.emf"

Note

WPViewPDF can be used on Windows 98 or higher. Under Windows 9X it does not support rotated images since the required windows API (SetWorldTransform) is not supported on this platform.

There are different layout and zoom modes which can be selected by the user by a simple click on one of the small buttons in the lower right corner.

Using the buttons in the lower right corner the user may jump from page to page.

The button in the upper right corner opens a menu with entries for PDF "info", print and the PDF Viewer "About" box. The captions of this menus can be changed from outside and of course any of the buttons or menu items can be hidden *).

Hyperlinks in the document can be clicked by the user to jump to a different location in the PDF files - pressing BACKSPACE the viewer will go back to the previous location.

 

Properties

 

Methods

 

Events