3-heights™ pdf viewer .net wpf control · the 3-heights™ pdf viewer .net wpf control is a...

32
User Manual 3-Heights™ PDF Viewer .NET WPF Control Version 4.10

Upload: others

Post on 16-Mar-2020

47 views

Category:

Documents


0 download

TRANSCRIPT

User Manual

3-Heights™PDF Viewer .NET WPF Control

Version 4.10

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 1/31

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.1 Viewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.2 Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.3 Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2.4 Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.4 Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Installation and Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.1 Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Interface Specific Installation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.1 COM Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.2 Java Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2.3 .NET Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2.4 C Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.3 Color Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.3.1 Default Color Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.3.2 Get Other Color Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.4 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.4.1 Font Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.5 Note about the Evaluation License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.6 Special Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.6.1 Directory for temporary files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.6.2 Cache Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.6.3 Font Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3 License Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.1 License Installation and Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.1.1 Graphical License Manager Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

List all installed license keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Add and delete license keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Display the properties of a license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.1.2 Command Line License Manager Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 License Selection and Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.1 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.2.2 Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.3 Key Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4 License activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4.1 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.4.2 Reactivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.4.3 Deactivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.5 Offline Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.5.1 First Step: Create a Request File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.5.2 Second Step: Use Form on Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.5.3 Third Step: Apply the Response File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 2/31

3.6 License Key Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.7 License Key Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.7.1 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.8 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.8.1 License key cannot be installed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.8.2 License is not visible in license manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.8.3 License is not found at runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.8.4 Eval watermark is displayed where it should not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4 User’s Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2 Open a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.3 Open a file using a password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.4 Navigate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5 Use Custom Styles to Modify the Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Programmer’s Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1 Viewer .NET WPF Control Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1.1 Border . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1.2 Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1.3 Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1.4 Dispose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.1.5 FitMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.1.6 GetLicenseIsValid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.1.7 LayoutMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.1.8 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.1.9 OpenMem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.1.10 PageCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.1.11 PageNo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.1.12 ProductVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.1.13 Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.14 Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.15 ScrollToBottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.16 ScrollToLeftEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.17 ScrollToRightEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.18 ScrollToTop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.19 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.20 SearchEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.21 SearchNext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.22 SearchOverlayBrush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.23 SetLicenseKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.24 ShowOutlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.1.25 ShowThumbnails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.1.26 UserUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.1.27 Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.2 Delegates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2.1 SearchResultDelegate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.3 Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.3.1 FitMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.3.2 LayoutMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 3/31

6 Tips, Tricks and Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.2 Font and Text Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.2.1 Handle Non-Embedded Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Font Replacement Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.3 Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

7 Licensing, Copyright, and Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 4/31

1 Introduction

1.1 DescriptionThe 3-Heights™ PDF Viewer .NET WPF Control is a component which can be seamlessly integrated in .NET Windows Presentation Foundation (WPF) applications. The control offers many options for displaying PDF documents: files can be viewed in single page or multi-page mode, and the navigation supports bookmarks and calling up pages arbitrarily. The component supports PDF documents in many languages: the reproduction of Japanese, Chinese,Korean, Russian, etc., is no problem at all.

1.2 Functions

1.2.1 Viewing

Display PDF file in single page or multi-page modeEnter password to decrypt PDF documentsOpen files from file system or from internet (HTTP, HTTPS, FTP)Query the number of pages in a documentScale the display (fit to page size, fit to page width, actual size, zoom)Set display resolutionReproduce documents with Chinese, Japanese and Korean fonts (CJK)Read document from file or memoryConvert viewer coordinates to PDF coordinatesRotate the pageSet the border size

1.2.2 Navigation

Show and hide windows for bookmarks and page thumbnailsJump to a bookmark’s locationJump to the location of a link within the documentMove windows vertically and horizontally using the mouse or keyboardEnlarge and reduce windows with the aid of a zoom rectangle or zoom factorFreely select any page in the document for displayQuery the position of the cursorText searchSupport for touch input: Multi touch zoom and scrolling inertia

1.2.3 Formats

Input Formats

PDF 1.0 - 1.7 PDF/A

1.2.4 Compliance

Standards: ISO 32000-1 (PDF 1.7), ISO 19005-1 (PDF/A-1), ISO 19005-2 (PDF/A-2), ISO 19005-3 (PDF/A-3)

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 5/31

1.3 Interfaces

The API interface technology is suitable for all .NET languages such as C# and VB.NET.

1.4 Operating Systems

The 3-Heights™ PDF Viewer .NET WPF Control is available for the following operating systems:

Windows 7, 8, 8.1, 10 – 32 and 64 bitWindows Server 2008, 2008 R2, 2012, 2012 R2, 2016 – 32 and 64 bit

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 6/31

2 Installation and Deployment

2.1 Interfaces

The 3-Heights™ PDF Viewer .NET WPF Control provides four different interfaces. The installation and deployment of the software depend on the interface you are using. The table below shows the supported interfaces and examples with which programming languages they can be used.

Interface Programming Languages

.NET The MS software platform .NET can be used with any .NET capable programming language suchas:

C#VB .NETJ#others

This interface is available in the Windows version only.

Java The Java interface.

COM The component object model (COM) interface can be used with any COM-capable programminglanguage, such as:

MS Visual BasicMS Office Products such as Access or Excel (VBA)C++VBScriptothers

This interface is available in the Windows version only.

C The native C interface is for use with C and C++.

2.1.1 Development

The software developer kit (SDK) contains all files that are used for developing the software. The role of each file with respect to the four different interfaces is shown in table Files for Development. The files are split in four categories:

Req. This file is required for this interface.

Opt. This file is optional. See also table File Description to identify which files are required for your application.

Doc. This file is for documentation only.

Empty field An empty field indicates this file is not used at all for this particular interface.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 7/31

Files for Development

Name .NET Java COM C

bin\‹platform›\PdfViewerAPI.dll Req. Req. Req. Req.

bin\*NET.dll Req.

bin\*NET.xml Doc.

doc\*.pdf Doc. Doc. Doc. Doc.

doc\PdfViewerAPI.idl Doc.

doc\javadoc\*.* Doc.

include\pdfviewerapi_c.h Req.

include\*.* Opt.

jar\VWWA.jar Req.

lib\‹platform›\PdfViewerAPI.lib Req.

samples\*.* Doc. Doc. Doc. Doc.

The purpose of the most important distributed files of is described in table File Description.

File Description

Name Description

bin\‹platform›\PdfViewerAPI.dll This is the DLL that contains the main functionality (required).

bin\*NET.dll The .NET assemblies are required when using the .NET interface.The files bin\*NET.xml contain the corresponding XMLdocumentation for MS Visual Studio.

doc\*.* Various documentations.

include\*.* Contains files to include in your C / C++ project.

lib\‹platform›\PdfViewerAPI.lib The object file library needs to be linked to the C/C++ project.

jar\VWWA.jar The Java API archive.

samples\*.* Contains sample programs in different programming languages.

1 These files must reside in the same directory as PdfViewerAPI.dll.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 8/31

2.1.2 Deployment

For the deployment of the software only a subset of the files are required. Which files are required (Req.), optional (Opt.) or not used (empty field) for the four different interfaces is shown in the table below.

Files for Deployment

Name .NET Java COM C

bin\‹platform›\PdfViewerAPI.dll Req. Req. Req. Req.

bin\*NET.dll Req.

jar\VWWA.jar Req.

The deployment of an application works as described below:

1. Identify the required files from your developed application (this may also include color profiles).2. Identify all files that are required by your developed application.3. Include all these files into an installation routine such as an MSI file or simple batch script.4. Perform any interface-specific actions (e.g. registering when using the COM interface).

Example: This is a very simple example of how a COM application written in Visual Basic 6 could be deployed.

1. The developed and compiled application consists of the file application.exe. Color profiles are not used.2. The application uses the COM interface and is distributed on Windows only.

The main DLL PdfViewerAPI.dll must be distributed.3. All files are copied to the target location using a batch script. This script contains the following commands:

copy application.exe %targetlocation%\.

copy PdfViewerAPI.dll %targetlocation%\.

4. For COM, the main DLL needs to be registered in silent mode (/s) on the target system. This step requires Power-User privileges and is added to the batch script.

regsvr32 /s %targetlocation%\PdfViewerAPI.dll.

2.2 Interface Specific Installation Steps

2.2.1 COM Interface

Registration Before you can use the 3-Heights™ PDF Viewer .NET WPF Control component in your COM application program you have to register the component using theregsvr32.exeprogram that is provided with the Windows operating system. The following command shows the registration of PdfViewerAPI.dll. Note that in Windows Vista and later, the command needs to be executed from an administrator shell.

regsvr32 "C:\Program Files\PDF Tools AG\bin\‹platform›\PdfViewerAPI.dll"

Where ‹platform› is Win32 for the 32-bit and x64 for the 64-bit version.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 9/31

If you are using a 64-bit operating system and would like to register the 32-bit version of the 3-Heights™ PDF Viewer.NET WPF Control, you need to use theregsvr32 from the directory%SystemRoot%\SysWOW64 instead of%Sys-temRoot%\System32.2

If the registration process succeeds, a corresponding dialog window is displayed. The registration can also be done silently (e.g. for deployment) using the switch /s.

Other Files The other DLLs do not need to be registered, but for simplicity it is suggested that they reside in the same directory as the PdfViewerAPI.dll.

2.2.2 Java Interface

The 3-Heights™ PDF Viewer .NET WPF Control requires Java version 6 or higher.

For compilation and execution When using the Java interface, the Java wrapper jar\VWWA.jar needs to be on the CLASSPATH. This can be done by either adding it to the environment variable CLASSPATH, or by specifying it using the switch -classpath:

javac -classpath ".;C:\Program Files\PDF Tools AG\jar\VWWA.jar" sample.java

For execution Additionally the libraryPdfViewerAPI.dll needs be in one of the system’s library directories3 oradded to the Java system property java.library.path. This can be achieved by either adding it dynamically atprogram startup before using the API, or by specifying it using the switch -Djava.library.path when starting the Java VM. Choose the correct subdirectory x64 or Win32 depending on the platform of the Java VM4.

java -classpath ".;C:\Program Files\PDF Tools AG\VWWA.jar" ^

-Djava.library.path=C:\Program Files\PDF Tools AG\bin\x64 sample

2.2.3 .NET Interface

The 3-Heights™ PDF Viewer .NET WPF Control does not provide a pure .NET solution. Instead, it consists of .NETassemblies, which are added to the project and a native DLL, which is called by the .NET assemblies. This has to be accounted for when installing and deploying the tool.

The .NET assemblies (*NET.dll) are to be added as references to the project. They are required at compilation time.

PdfViewerAPI.dll is not a .NET assembly, but a native DLL. It is not to be added as a reference in the project.

The native DLL PdfViewerAPI.dll is called by the .NET assembly PdfViewerNET.dll.

PdfViewerAPI.dllmust be found at execution time by the Windows operating system. The common way to do this is addingPdfViewerAPI.dll as an existing item to the project and set its property “Copy to output directory”to “Copy if newer”.

Alternatively the directory where PdfViewerAPI.dll resides can be added to the environment variable %Path%or it can simply be copied manually to the output directory.

2 Otherwise you get the following message: LoadLibrary("PdfViewerAPI.dll") failed - The specified module could not be found.

3 On Windows defined by the environment variable PATH and e.g. on Linux defined by LD_LIBRARY_PATH.4 If the wrong data model is used, there is an error message similar to this: Can't load IA 32-bit .dll on a AMD 64-bit platform

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 10/31

2.2.4 C Interface

The header file pdfviewerapi_c.h needs to be included in the C/C++ program.The library PdfViewerAPI.lib needs to be linked to the project.The dynamic link library PdfViewerAPI.dll needs to be in a path of executables (e.g. on the environmentvariable %PATH%).

2.3 Color Profiles

If no color profiles are available, default profiles for both RGB and CMYK are generated on the fly by the 3-Heights™ PDF Viewer .NET WPF Control.

2.3.1 Default Color Profiles

If no particular color profiles are set default profiles are used. For device RGB colors a color profile named "sRGB

Color Space Profile.icm" and for device CMYK a profile named "USWebCoatedSWOP.icc" are searched for in the following directories:

Windows

1. %SystemRoot%\spool\drivers\color

2. directory Icc, which must be a direct sub-directory of where the PdfViewerAPI.dll resides.

2.3.2 Get Other Color Profiles

Most systems have pre-installed color profiles available, for example on Windows at %SystemRoot%\sys-tem32\spool\drivers\color\. Color profiles can also be downloaded from the links provided in the directorybin\Icc\ or from the following websites:

http://www.pdf-tools.com/public/downloads/resources/colorprofiles.zip

http://www.color.org/srgbprofiles.html

https://www.adobe.com/support/downloads/iccprofiles/iccprofiles_win.html

2.4 Fonts

2.4.1 Font Cache

A cache of all fonts in all Font Directories is created. If fonts are added or removed from the font directories, the cache is updated automatically.

In order to achieve optimal performance, make sure that the cache directory is writable for the 3-Heights™ PDFViewer .NET WPF Control. Otherwise the font cache cannot be updated and the font directories have to be scanned on each program startup.

The font cache is created in the subdirectory <CacheDirectory>/Installed Fonts of the Cache Directory.

2.5 Note about the Evaluation License

With the evaluation license the 3-Heights™ PDF Viewer .NET WPF Control automatically adds a watermark to the displayed pages.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 11/31

2.6 Special Directories

2.6.1 Directory for temporary files

This directory for temporary files is used for data specific to one instance of a program. The data is not shared between different invocations and deleted after termination of the program.

The directory is determined as follows. The product checks for the existence of environment variables in the follow-ing order and uses the first path found:

Windows

1. The path specified by the %TMP% environment variable.2. The path specified by the %TEMP% environment variable.3. The path specified by the %USERPROFILE% environment variable.4. The Windows directory.

2.6.2 Cache Directory

The cache directory is used for data that is persisted and shared between different invocations of a program. The actual caches are created in subdirectories. The content of this directory can safely be deleted to clean all caches.

This directory should be writable by the application, otherwise caches cannot be created or updated and perfor-mance will degrade significantly.

Windows

If the user has a profile:%LOCAL_APPDATA%\PDF Tools AG\Caches

If the user has no profile:<TempDirectory>\PDF Tools AG\Caches

where <TempDirectory> refers to the Directory for temporary files.

2.6.3 Font Directories

The location of the font directories depends on the operating system. Font directories are traversed recursively in the order as specified below.

If two fonts with the same name are found, the latter one takes precedence, i.e. user fonts will always take prece-dence over system fonts.

Windows

1. %SystemRoot%\Fonts

2. directory Fonts, which must be a direct sub-directory of where PdfViewerAPI.dll resides.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 12/31

3 License Management

3.1 License Installation and ManagementThere are three possibilities to pass the license key to the application:

1. The license key is installed using the GUI tool (graphical user interface). This is the easiest way if the licenses are managed manually. It is only available on Windows.

2. The license key is installed using the shell tool. This is the preferred solution for all non-Windows systems and for automated license management.

3. The license key is passed to the application at run-time via the SetLicenseKey method. This is the preferred solution for OEM scenarios.

3.1.1 Graphical License Manager Tool

The GUI tool LicenseManager.exe is located in the bin directory of the product kit (Windows only).

List all installed license keys

The license manager always shows a list of all installed license keys in the left pane of the window. This includes licenses of other PDF Tools products. The user can choose between:

Licenses available for all users. Administrator rights are needed for modifications.Licenses available for the current user only.

Add and delete license keys

License keys can be added or deleted with the “Add Key” and “Delete” buttons in the toolbar.

The “Add key” button installs the license key into the currently selected list.The “Delete” button deletes the currently selected license keys.

Display the properties of a license

If a license is selected in the license list, its properties are displayed in the right pane of the window.

3.1.2 Command Line License Manager Tool

The command line license manager tool licmgr is available in the bin\x86 and bin\x64 directory.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 13/31

A complete description of all commands and options can be obtained by running the program without parameters:

licmgr

List all installed license keys:

licmgr list

The currently active license for a specific product is marked with a star ’*’ on the left side.

Add and delete license keys:

Install new license key:

licmgr store 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Delete old license key:

licmgr delete 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Both commands have the optional argument -s that defines the scope of the action:

g For all users

u Current user

3.2 License Selection and Precedence

3.2.1 Selection

If multiple keys for the same product are installed in the same scope, only one of them can be active at the same time.

Installed keys that are not selected are not considered by the software!

In the Grahical User Interface use the check box on the left side of the license key to mark a license as se-lected.

With the Command Line Interface use the select subcommand:

licmgr select 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 14/31

3.2.2 Precedence

License keys are considered in the following order:

1. License key passed at runtime.2. License selected for the current user3. License selected for the current user (legacy key format)4. License selected for all users5. License selected for all users (legacy key format)

The first matching license is used, regardless whether it is valid or not.

3.3 Key UpdateIf a license property like the maintenance expiration date changes, the key can be update directly in the license manager.

In the Grahical User Interface select the license and press the button "Update Key" in the toolbar:

With the Command Line Interface use the update subcommand:

licmgr update 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

3.4 License activationNew licenses keys have to be activated (except for OEM licenses). These keys have to be installed in the license manager and may not be passed to the component at runtime.

The license activation is tied to a specific computer. If the license is installed at user scope, the activation is also tied to that specific user. The same license key can be activated multiple times, if the license quantity is larger than 1.

Every license key includes a date, after which the license has to be activated, which is typically 10 days after the issuing date of the key. Prior to this date, the key can be used without activation and without any restrictions.

3.4.1 Activation

The License can be activated directly within the license manager. Every activation increases the activation count of the license by 1.

In the Grahical User Interface select the license and press the button "Activate license" in the toolbar:

With the Command Line Interface use the activate subcommand:

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 15/31

licmgr activate 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Note that the key has to be installed first.

3.4.2 Reactivation

The activation is tied to specific properties of the computer like the MAC address or host name. If one of these properties changes, the activation becomes invalid and the license has to be reactivated. A reactivation does notincrease the activation count on the license.

The process for reactivation is the same as for the activation.

In the Grahical User Interface the button "Activate license" changes to "Reactivate license":

With the Command Line Interface the subcommand reactivate is used instead of activate:

licmgr reactivate 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

3.4.3 Deactivation

To move a license to a different computer, it has to be deactivated first. Deactivation decreases the activation countof the license by 1.

The process for deactivation is similar to the activation process.

In the Grahical User Interface select the license and press the button "Deactivate license" in the toolbar:

With the Command Line Interface use the deactivate subcommand:

licmgr deactivate 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

3.5 Offline Usage

The following actions in the license manager need access to the internet:

License ActivationLicense Reactivation

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 16/31

License DeactivationKey Update

On systems wihout internet access, a three step process can be used instead, using a form on the PDF Tools website.

3.5.1 First Step: Create a Request File

In the Grahical User Interface select the license and use the dropdown menu on the right side of the button in the toolbar:

With the Command Line Interface use the -fs option to specify the destination path of the request file:

licmgr activate -fs activation_request.bin 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

License Deactivation: When saving the deactivation request file, the license isdeactivated immediately and cannot be used any further. It can however onlybe activated again after completing the deactivation on the website.

3.5.2 Second Step: Use Form on Website

Open the following website in a web browser: http://www.pdf-tools.com/pdf20/en/mypdftools/licenses-kits/license-activation/ Upload the request by dragging it onto the marked area:

Upon success, the response will be downloaded automatically if necessary.

3.5.3 Third Step: Apply the Response File

In the Grahical User Interface select the license and use the dropdown menu on right side of the button in the toolbar:

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 17/31

With the Command Line Interface use the -fl option to specify the source path of the response file:

licmgr activate -fl activation_response.bin 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

3.6 License Key VersionsAs of 2018 all new keys will have the format 1-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. Legacykeys with the old format 0-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX are still accepted for a limited time period.

For compatibility reasons, old and new version keys can be installed side by side and one key of each version can be selected at the same time. In that case, the software always uses the new version.

3.7 License Key StorageDepending on the platform the license management system uses different stores for the license keys.

3.7.1 Windows

The license keys are stored in the registry:

“HKLM\Software\PDF Tools AG” (for all users)“HKCU\Software\PDF Tools AG” (for the current user)

3.8 Troubleshooting

3.8.1 License key cannot be installed

The license key cannot be installed in the license manager application. The error message is: "Invalid license format."

Possible causes:

The license manager application is an older version that only supports the legacy key format.

Solution

Use a current version of the license manager application or use a license key in the legacy key format if available.

3.8.2 License is not visible in license manager

The license key was successfully installed previously but is not visible in the license manager anymore. The software is still working correctly.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 18/31

Possible causes:

The license manager application is an older version that only supports the legacy key format.

Solution

Use a current version of the license manager application.

3.8.3 License is not found at runtime

The license is not found at runtime by the software. The error message is: "No license key was set."

Possible causes:

The license key is actually missing (not installed).The license key is installed but not selected in the license manager.The application is an older version that only supports the legacy key format, while the license key has the newlicense format.

Solution

Install and select a valid license key that is compatible with the installed version of the software or use a newerversion of the software. The new license key format is supported starting with version 4.10.26.1

For compatibility reasons, one license key of each format can be selected at the same time.

3.8.4 Eval watermark is displayed where it should not

The software prints an evaluation watermark onto the output document, even if the installed license is a productive one.

Possible causes:

There is an evaluation license key selected for the current user, that takes precedence over the key for all users.

Note: The software might be run under a different user than the license managerapplication.

There is an evaluation license key selected with a newer license format that takes precedence over the key in the older format.The software was not restarted after changing the license key from an evaluation key to a productive one.

Solution

Disable or remove all evaluation license in all scopes and restart the software.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 19/31

4 User’s Guide

4.1 Getting Started

After installing PDF Viewer, you can open the sample program in Visual Studio to run and test the component. Here are the steps:

1. Go to the sample directory, e.g. C:\Program Files\PDF Tools\VWWA\Samples\CS.NET\Viewer2. Open the file Viewer.sln.3. This should now look like this:

Now press the “run” button and the viewer should pop up.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 20/31

Now you can open a file using the left-most button in the toolbar and try out the component.

4.2 Open a fileUse the Open method to open a PDF file from disk. If the call fails then the license might be invalid, so check for a valid license in this case.

if (!Viewer.Open(dialog.FileName, null))

{

if (!PdfViewerWPF.GetLicenseIsValid())

{ MessageBox.Show (Properties. MainWindowRes.invalid_license,

Properties.MainWindowRes.open_error,

MessageBoxButton.OK,

MessageBoxImage.Error);

}

else

{

///

}

}

To open a PDF file for memory, use the method OpenMem.

4.3 Open a file using a passwordA password must be provided if the file is encrypted with a user password. For documents that have no user pass-word set, use the default password—an empty string.

if (!Viewer.Open(dialog.FileName, null))

{

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 21/31

if (!PdfViewerWPF.GetLicenseIsValid())

{

///

}

else

{

PasswordWindow window = new PasswordWindow();

Viewer.Open(dialog.FileName, window.Password);

}

}

4.4 Navigate

There are various ways how the user can navigate in a document with the viewer control. The application program-mer has all options to enable, disable or limit the user’s navigation. The following features can be used to navigate:

Use the property PageNo to set page number to be displayed. The page range goes from 1 to PageCount.Use the mouse.Use horizontal and vertical scroll bars.Use the mouse wheel to scroll.Use the property Destination to move to a specific location and zoom level within the document.Use the outlines (bookmarks) or thumbnails from the navigation panel at left hand side of the control to access a position.Internal and external links within the content of the PDF document can a be used to navigate.

4.5 Use Custom Styles to Modify the Control

The PdfViewerWPF control can be customized using custom styles. Note that named controls (e.g. PART_Main-Viewer) may not be removed from the style file. However, they may be hidden.

Example: Create a custom style resource CustomStyle.xaml and add it to the control in MainWindow.xaml

<custom:PdfViewerWPF Name="PdfViewer" Grid.Row="1" FitMode="FitWidth"

LayoutMode="LayoutDocument" Style="{StaticResource CustomStyle}">

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 22/31

5 Programmer’s Reference

The following section lists all methods and properties of the COM interface of the 3-Heights™ PDF Viewer .NET WPFControl.

5.1 Viewer .NET WPF Control Interface

5.1.1 Border

Property (get, set): Double Border

Default: 6.0

Get and set the border size in user units.

5.1.2 Close

Method: Boolean Close()

Close an opened input file. If the document is already closed the method does nothing.

Returns:

True The file was closed successfully.

False Otherwise.

5.1.3 Destination

Property (get, set): Destination Destination

Get and set the actual destination in the document. Setting the destination navigates to the corresponding position in the document. If the zoom is 0, the current zoom is used. The page denotes the first page in the viewport. The xand y positions denote the top left corner in the viewport.

5.1.4 Dispose

Method: void Dispose()

Release unmanaged resources. After calling this method the object cannot be used anymore.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 23/31

5.1.5 FitMode

Property (get, set): FitMode FitMode

Default: FitWidth

The fit mode defines how the pages are displayed in the viewer component. The available fit modes are explained in the enumeration FitMode. The fit mode can be altered at any time.

5.1.6 GetLicenseIsValid

Method: Boolean GetLicenseIsValid()

Check whether the license key is valid.

Returns:

True A valid License Key was found.

False Otherwise.

5.1.7 LayoutMode

Property (get, set): LayoutMode LayoutMode

The layout mode determines whether pages are displayed continuously or not. Consequently there are two avail-able layout modes, these are: LayoutDocument and LayoutPage, see LayoutMode.

The layout mode may be changed whilst a document is being displayed. The layout mode has no impact on printing.

5.1.8 Open

Method: Boolean Open(String Filename, String Password)

Open a PDF file, i.e. make the objects contained in the document accessible. If another document is already open,it is closed first.

Parameters:

Filename [String] The file name and optionally the file path, drive or server string according to the operating systems file name specification rules.

Password [String] (optional) The user or the owner password of the encrypted PDF document. If this parameter is left out an empty string is used as a default.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 24/31

Returns:

True The file could be successfully opened.

False Otherwise.

5.1.9 OpenMem

Method: Boolean OpenMem(Variant MemBlock, String Password)

Open a PDF file, i.e. make the objects contained in the document accessible. If a document is already open, it is closed first.

Parameters:

MemBlock [Variant] The memory block containing the PDF file given as a one dimensional byte array.

Password [String] (optional) The user or the owner password of the encrypted PDF document. If this parameter is left out an empty string is used as a default.

Returns:

True The document could be successfully opened.

False The document could not be opened, it is corrupt, or the password is not valid.

5.1.10 PageCount

Property (get): Long PageCount

Get the number of pages of an open document. If the document is closed or if the document is a collection (also known as PDF Portfolio) then this property is 0.

5.1.11 PageNo

Property (get, set): Long PageNo

Get and set the page number. Setting the page number navigates to the given page (see Destination).

The numbers are counted starting from 1 for the first page to the value of PageCount for the last page.

5.1.12 ProductVersion

Property (get): String ProductVersion

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 25/31

Get the version of the 3-Heights™ PDF Viewer .NET WPF Control in the format “A.C.D.E”.

5.1.13 Resolution

Property (get, set): Resolution Resolution

Get and set the display resolution in dots per inch (DPI). Initially, the resolution is set to the resolution of the displaydevice.

5.1.14 Rotate

Property (get, set): Integer Rotate

Default: 0

Get and set the “rotate” angle in multiples of 90◦. Each individual page is rotated by the given angle.

5.1.15 ScrollToBottom

Method: void ScrollToBottom()

Scrolls vertically to the bottom of the current view.

5.1.16 ScrollToLeftEnd

Method: void ScrollToLeftEnd()

Scrolls horizontally to the beginning of the current view.

5.1.17 ScrollToRightEnd

Method: void ScrollToRightEnd()

Scrolls horizontally to the end of the current view.

5.1.18 ScrollToTop

Method: void ScrollToTop()

Scrolls vertically to the top of the current view.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 26/31

5.1.19 Search

Method: void Search(String searchText, SearchResultDelegate resultDelegate)

Search text in the document. The search starts at the current page. In the case of a successful search, the documentis positioned to the next occurrence of the text and the found string is highlighted.

Parameters:

searchText [String] The text to search

resultDelegate [SearchResultDelegate] Callback for the result of the current search.

5.1.20 SearchEnd

Method: void SearchEnd()

Terminate a previously started text search operation. Highlights from previous text searches are removed.

5.1.21 SearchNext

Method: void SearchNext(SearchResultDelegate resultDelegate)

Continue a previously started text search operation. The search starts at the current page. In the case of a successful search, the document is positioned to the next occurrence of the text and the found string is highlighted.

Parameter:

resultDelegate [SearchResultDelegate] Callback for the result of the current search

5.1.22 SearchOverlayBrush

Property (get, set): Brush SearchOverlayBrush

Default: lightblue SolidColorBrush with opacity of 0.5

Is the brush to use for the rectangular overlays of search results.

5.1.23 SetLicenseKey

Method: Boolean SetLicenseKey(string licenseKey)

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 27/31

Set the license key. The call to this method is required if the license key is passed programmatically. If the license key has been installed using the license manager then this call is obsolete.

Parameter:

licenseKey [string] The license key string

Returns:

True If the License Key is valid

False Otherwise

5.1.24 ShowOutlines

Property (get, set): Boolean ShowOutlines

Default: True

Get and set the show status of the document outlines. If set to true the outline pane is visible.

5.1.25 ShowThumbnails

Property (get, set): Boolean ShowThumbnails

Default: True

Get and set the show status of the page thumbnails. If set to true the thumbnail pane is visible.

5.1.26 UserUnit

Property (get): Double UserUnit

Default: 1.0

Get the documents user unit measure in points (1 pt = 1/72 inch).

5.1.27 Zoom

Property (get, set): Double Zoom

Default: depends on fit mode

Get and set the zoom factor. A zoom factor of 1.0 denotes true size. The zoom factor depends on the fit mode and the size of the viewport.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 28/31

5.2 Delegates

5.2.1 SearchResultDelegate

Method: void SearchResultDelegate(String searchText, Boolean success)

If Search and SearchNext is used then this delegate is called back if the search operation terminates. The string parameter returns the text which was searched for and a bool which returns true if the text was found.

5.3 Enumerations

5.3.1 FitMode

FitMode Table

FitMode Description

FitNone No fit mode.

FitPage The window is zoomed to fit the whole page into the viewport.

FitTrueSize The window is zoomed to reflect the true size of the page.

FitWidth The window is zoomed to fit the page’s width into the viewport.

5.3.2 LayoutMode

LayoutMode Table

LayoutMode Description

LayoutDocument Render the whole document (known as continuous page layout).

LayoutPage Render a definite number of pages (e.g. a single page).

LayoutUndef No layout mode. Should not be set by the user.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 29/31

6 Tips, Tricks and Troubleshooting

6.1 Performance

The 3-Heights™ PDF Viewer .NET WPF Control provides a variety of settings to tune the performance. In most cases a simple rule applies: Higher quality takes more resources (memory, CPU) and therefore lowers the performance.

The following settings have an impact on the performance:

Content of the PDF A document with thousands of objects requires more time for rendering than a page with plain text.

Resolution The higher the size of the viewer window the more pixels need to be drawn and the lower the performance.

Thumbnails Displaying thumbnails reduces the performance. Use outlines instead.

6.2 Font and Text Issues

1. For issues with text using non-embedded fonts:1. Ensure the required fonts are available on the system (see Chapter Fonts).2. See Section Handle Non-Embedded Fonts.

6.2.1 Handle Non-Embedded Fonts

Font Replacement Strategy

This section describes the exact behavior of font handling of the rendering engine. It is rather technical and it is notrequired to be understood in order to properly use the software.

The following steps are performed sequentially in the search of a font. If a font is found, the search is stopped;otherwise the next step is performed.

1. If the font is not embedded or eOptionPreInstalled is set:a. If the font name appears in the [replace] section in the configuration file fonts.ini the name is re-

placed and looked up in the installed font collection.b. If it is a standard font5 it is replaced by the equivalent TrueType font name and it is looked up in the installed

font collection.c. If the font name appears in the [fonts] section in the configuration file fonts.ini the name is replaced

and looked up in the installed font collection.d. If the font has “Italic” or “Bold” in its name the font without these styles is looked up in the installed font

collection.2. If a font name is looked up in the installed font collection then the name comparison is performed as follows:

a. PostScript name.b. TrueType name without blanks (a missing style is interpreted as “Regular” or “Normal”).c. TrueType name without modifications.

5 e.g. Times-Roman, Helvetica, Courier

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 30/31

3. If the font is embedded, it is converted to a Windows compatible font and temporarily installed. If eOption-NoEmbedded is used then the glyphs of the fonts are converted to either bitmaps or outlines6. IfeOptionOut-lines is used then the glyphs are converted to outlines only.

4. If the font is not embedded and the Unicodes are available then the nearest font from the installed font collection is tailored to the metrics of the font.

6.3 Transparency

The 3-Heights™ rendering engine supports transparency functions such as a number of blend modes as well as isolated and non-isolated transparency groups, but not transparency in general.

Certain types of tiling and shading patterns may not correctly be reproduced by the rendering engine.

6 The outline of a glyph is a vector graphic without any reference to the original font program.

© PDF Tools AG – Premium PDF Technology 3-Heights™ PDF Viewer .NET WPF Control, March 31, 2018 | 31/31

7 Licensing, Copyright, and Contact

PDF Tools AG is a world leader in PDF (Portable Document Format) software, delivering reliable PDF products to international customers in all market segments.

PDF Tools AG provides server-based software products designed specifically for developers, integrators, consultants,customizing specialists and IT-departments. Thousands of companies worldwide use our products directly and hun-dreds of thousands of users benefit from the technology indirectly via a global network of OEM partners. The tools can be easily embedded into application programs and are available for a multitude of operating system platforms.

Licensing and Copyright

The 3-Heights™ PDF Viewer .NET WPF Control is copyrighted. This user’s manual is also copyright protected; it maybe copied and given away provided that it remains unchanged including the copyright notice.

Contact

PDF Tools AGKasernenstrasse 18184 BachenbülachSwitzerlandhttp://www.pdf-tools.com

[email protected]