IDOL Keyview Viewing SDK 12.4 Programming Guide
Total Page:16
File Type:pdf, Size:1020Kb
KeyView Software Version 12.4 Viewing SDK Programming Guide Document Release Date: October 2019 Software Release Date: October 2019 Viewing SDK Programming Guide Legal notices Copyright notice © Copyright 2016-2019 Micro Focus or one of its affiliates. The only warranties for products and services of Micro Focus and its affiliates and licensors (“Micro Focus”) are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Documentation updates The title page of this document contains the following identifying information: l Software Version number, which indicates the software version. l Document Release Date, which changes each time the document is updated. l Software Release Date, which indicates the release date of this version of the software. To check for updated documentation, visit https://www.microfocus.com/support-and-services/documentation/. Support Visit the MySupport portal to access contact information and details about the products, services, and support that Micro Focus offers. This portal also provides customer self-solve capabilities. It gives you a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the MySupport portal to: l Search for knowledge documents of interest l Access product documentation l View software vulnerability alerts l Enter into discussions with other software customers l Download software patches l Manage software licenses, downloads, and support contracts l Submit and track service requests l Contact customer support l View information about all services that Support offers Many areas of the portal require you to sign in. If you need an account, you can create one when prompted to sign in. To learn about the different access levels the portal uses, see the Access Levels descriptions. KeyView (12.4) Page 2 of 384 Viewing SDK Programming Guide Contents Part I: Overview of Viewing SDK 15 Chapter 1: Introduction to Viewing SDK 16 Overview 16 Features 16 Viewing SDK and Visual Basic 17 Platforms, Compilers, and Dependencies 17 Supported Platforms 17 Supported Compilers 17 Software Dependencies 17 Windows Installation 18 Package Contents 19 License Information 19 Enable Advanced Document Readers 20 Update License Information 20 Directory Structure 21 Chapter 2: Getting Started 23 Before You Begin 23 View Initialization Information 23 Use an Initialization File 23 Viewing API 24 ActiveX Control 24 Use the Windows Registry File 24 Viewing API 25 ActiveX Control 25 Remove Functionality from an Application 26 Deploy Viewing API Applications 26 Deploy ActiveX Control Applications 27 Develop .NET Applications 27 Method and Property Naming Conventions 28 Sample Code 28 Deploy .NET Applications 29 Part II: Viewing API 31 Chapter 3: Use the Viewing API 32 Overview of the Viewing API 32 Create a Viewing API Window 33 Get the Viewer Window of the Document 34 Open and View a Document 34 Notification Messages 35 Save a Document 35 KeyView (12.4) Page 3 of 384 Viewing SDK Programming Guide Convert a Document 36 Print a Document 36 Change the Print Job Name 37 Determine the Document Format 37 Extract Document Metadata 38 Change Document Options 38 Annotate, Highlight, or Index a Document 38 Draw a Page 39 Draw a Page into a Supplied Device Context 39 Edit a Document 39 Search for Text 39 Copy Text 40 Modify the Document View 40 Change the Layout of a Document 40 Change the Aspect Ratio of a Document 40 Invert, Rotate, or Magnify a Document 40 Display or Hide Gridlines in a Document 41 Play a Multimedia Document 41 Change the Current Object in a Document 42 View Deleted Items and Document Revision Marks 42 View Container Files 43 Microsoft Outlook Personal Folders (PST) Files 43 Choose the Reader to use for PST Files 44 Lotus Notes Database (NSF) 45 System Requirements 45 Installation and Configuration 46 Format Notes 46 View Mail Messages and Mail Stores 46 View Archive Files 48 Extract Subfiles to a Viewing Window or Disk 49 Display Subfiles in the Preview Pane 49 Set a Password for a Container File 50 View PDF Documents 50 Use the Acrobat ActiveX Control 50 Use the Microsoft WebBrowser ActiveX Control 50 Use a Graphic-Based PDF Reader 51 Use the kppdfrdr Reader 51 Use the kppdf2rdr Reader 52 Specify the Graphic-based Reader 52 View or Extract PDF Portfolio Documents 53 View Microsoft Visio Files 54 Extract Microsoft Excel Formulas 54 Chapter 4: Viewing API Sample Programs 57 Overview 57 Compile the Sample Programs 57 Run the Sample Programs 57 KeyView (12.4) Page 4 of 384 Viewing SDK Programming Guide Viewing SDK Initialization Information 57 hellovapi 58 Load kvvapi.dll 58 Create the VAPI Window 58 Open a Document 59 hellovapi.c 60 hellovapi.h 65 hellovapi.rc 65 vapidemo 65 mfckv 65 rtfdemo 66 prntdemo 66 filetype 66 ihademo 66 drawdemo 67 uzipdemo 67 Chapter 5: Message Parameters 68 VAPIM_ANNOTATE 71 VAPIM_ENABLEINDEX 72 VAPIM_GETNEXTTEXTBUFFER 73 VAPIM_GETPAGEFROMLOGICAL 74 VAPIM_GETSUMMARYINFO 74 VAPIM_GETTEXT 75 VAPIM_GOTO_PAGE 76 VAPIM_HAVEHILITE 77 VAPIM_POSITION 77 VAPIM_POSITIONHILITE 78 VAPIM_SETCURSOR 79 VAPIM_SETHILITE 80 VAPIM_SETHILITEOPTIONS 80 VAPIM_SETINDEXBUFCHARSET 81 VAPIM_SHOWHITS 82 VAPIM_CONVERT 82 VAPIMWP_CANCONVERT 83 VAPIMWP_DRAW_DRAWPAGE 84 VAPIMWP_DRAW_DRAWTOFILE 85 VAPIMWP_DRAW_GETPAGECOUNT 86 VAPIMWP_DRAW_GETPAGESIZE 87 VAPIMWP_DRAW_GETWORKBOOKPAGECOUNT 88 VAPIMWP_DRAW_INIT 89 VAPIMWP_DRAW_SHUTDOWN 89 VAPIMWP_EDIT_CANCOPY 90 VAPIMWP_EDIT_CANFIND 91 VAPIMWP_EDIT_CANSELECTALL 92 VAPIMWP_EDIT_COPY 92 VAPIMWP_EDIT_FIND 93 KeyView (12.4) Page 5 of 384 Viewing SDK Programming Guide VAPIMWP_EDIT_FIND_UNICODE 94 VAPIMWP_EDIT_GETFINDTEXT 94 VAPIMWP_EDIT_SELECTALL 95 VAPIMWP_FILE_CANSAVEAS 96 VAPIMWP_FILE_CANUNZIP 97 VAPIMWP_FILE_CLOSE 98 VAPIMWP_FILE_SAVEAS 98 VAPIMWP_FILE_UNZIP 99 VAPIMWP_INIT_GETCHARSET 100 VAPIMWP_INIT_GETDESCRIP 100 VAPIMWP_INIT_GETDOCCLASS 101 VAPIMWP_INIT_GETDOCFORMAT 102 VAPIMWP_INIT_GETFILENAME 103 VAPIMWP_INIT_GETHWNDVIEWER 104 VAPIMWP_INIT_JUMPTOFIRSTHILIITE 104 VAPIMWP_INIT_OPEN_DOCUMENT 105 VAPIMWP_INIT_SETPASSWORD 107 VAPIMWP_INIT_SETSRCCHARSET 108 VAPIMWP_INIT_SETTRGCHARSET 108 VAPIMWP_MULTIOBJ_CANMULTIOBJ 109 VAPIMWP_MULTIOBJ_CANNEXTOBJ 110 VAPIMWP_MULTIOBJ_CANPREVOBJ 111 VAPIMWP_MULTIOBJ_CANSETCURRENTOBJ 111 VAPIMWP_MULTIOBJ_GETOBJCOUNT 112 VAPIMWP_MULTIOBJ_NEXTOBJ 113 VAPIMWP_MULTIOBJ_OBJNAME 114 VAPIMWP_MULTIOBJ_PREVOBJ 115 VAPIMWP_MULTIOBJ_SETCURRENTOBJ 115 VAPIMWP_OPTIONS_GETOPTIONS_EX 116 VAPIMWP_OPTIONS_SETOPTIONS_EX 117 VAPIMWP_PRINT_ANNOTATIONS 118 VAPIMWP_PRINT_CANPRINT 118 VAPIMWP_PRINT_PAGESETUP 119 VAPIMWP_PRINT_PRINT 120 VAPIMWP_PRINT_PRINTHEADER 121 VAPIMWP_PRINT_PRINTSETUP 121 VAPIMWP_PRINT_PRINTTOPD 122 VAPIMWP_PRINT_PRINTTOPRINTER 123 VAPIMWP_PRINT_SETPRINTNAME 124 VAPIMWP_VIEW_CANASPECTRATIO 124 VAPIMWP_VIEW_CANDECREASEFONT 125 VAPIMWP_VIEW_CANFITTOWINDOW 126 VAPIMWP_VIEW_CANGOTO 127 VAPIMWP_VIEW_CANGRIDLINES 128 VAPIMWP_VIEW_CANINCREASEFONT 128 VAPIMWP_VIEW_CANINVERT 129 KeyView (12.4) Page 6 of 384 Viewing SDK Programming Guide VAPIMWP_VIEW_CANLAYOUT 130 VAPIMWP_VIEW_CANMAGNIFY 131 VAPIMWP_VIEW_CANPAUSE 132 VAPIMWP_VIEW_CANPLAY 132 VAPIMWP_VIEW_CANPREVIEWPANE 133 VAPIMWP_VIEW_CANROTATE 134 VAPIMWP_VIEW_CANSTOP 135 VAPIMWP_VIEW_DECREASEFONT 136 VAPIMWP_VIEW_END 136 VAPIMWP_VIEW_GETASPECTRATIO 137 VAPIMWP_VIEW_GETGRIDLINES 138 VAPIMWP_VIEW_GETINVERT 139 VAPIMWP_VIEW_GETLAYOUT 139 VAPIMWP_VIEW_GETMAGNIFY 140 VAPIMWP_VIEW_GETPLAYMODE 141 VAPIMWP_VIEW_GETPREVIEWPANE 142 VAPIMWP_VIEW_GETROTATE 143 VAPIMWP_VIEW_GOTOPAGE 144 VAPIMWP_VIEW_INCREASEFONT 144 VAPIMWP_VIEW_LOOP 145 VAPIMWP_VIEW_PAUSE 146 VAPIMWP_VIEW_PLAY 146 VAPIMWP_VIEW_SETASPECTRATIO 147 VAPIMWP_VIEW_SETGRIDLINES 148 VAPIMWP_VIEW_SETINVERT 148 VAPIMWP_VIEW_SETLAYOUT 149 VAPIMWP_VIEW_SETMAGNIFY 150 VAPIMWP_VIEW_SETPREVIEWPANE 151 VAPIMWP_VIEW_SETROTATE 151 VAPIMWP_VIEW_STOP 152 Chapter 6: Notification Message Parameters 154 VAPINM_ANNOTATION_HIT 154 VAPINM_EXTENT 155 VAPINM_SELECTION 156 VAPINM_TEXTBUFFER 156 VAPINM_USERCLICK 158 VAPINM_VIEW_FILE 158 VAPINMWP_INIT_DISABLEUI 159 VAPINMWP_INIT_DOCTYPE 160 VAPINMWP_INIT_GETTEMPFILEPATH 160 VAPINMWP_INIT_OPENDOCDONE 161 VAPINMWP_INIT_PAGENUMBER 162 VAPINMWP_MULTIOBJ_OBJNAME 162 VAPINMWP_OPTIONS_GETOPTIONS_EX 163 VAPINMWP_PRINT_PRINTDONE 164 Chapter 7: Structures 165 KeyView (12.4) Page 7 of 384 Viewing SDK Programming Guide ADDOCINFO 165 ALL_OPTIONS_EX 166 KPTPIOobj 167 KVSumInfoElemEx 168 KVSummaryInfoEx 168 TPVAPIAnnotation 169 TPVAPIConvert 170 TPVAPICreateParams 171 TPVAPIDrawFileInfo 172 TPVAPIDrawPageInfo 173 TPVAPIExtract 174 TPVAPIFindInfo 175 TPVAPIFirstLast 176 TPVAPIGetText 176 TPVAPIHiLiteColor 177 TPVAPIHiLiteOptions 178 TPVAPIOpenDocumentInfo 178 TPVAPIPageSize 182 TPVAPIPosition 183 TPVAPITextInfo 184 Part III: Viewing ActiveX Control 185 Chapter 8: Use the Viewing ActiveX Control 186 Overview of the Viewing ActiveX Control 186 Open and View a Document 187 Save a Document 187 Convert a Document 188 Print a Document 188 Determine the Document Format 189 Extract Document Metadata 189 Search for Text in a Document 189 Copy a Selected Area of Text 190 Copy all the Text in a Document 190 Create a Thumbnail Image of a Document Page 190 Filter a Document 191 Highlight Text in a Document 191 Annotate Text in a Document 191 Chapter 9: Control Sample Programs