IDOL Keyview HTML Export SDK 12.6 C and COM
Total Page:16
File Type:pdf, Size:1020Kb
KeyView Software Version 12.6 HTML Export SDK C and COM Programming Guide Document Release Date: June 2020 Software Release Date: June 2020 HTML Export SDK C and COM Programming Guide Legal notices Copyright notice © Copyright 1997-2020 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.6) Page 2 of 457 HTML Export SDK C and COM Programming Guide Contents Part 1: Overview of HTML Export 14 Chapter 1: Introducing HTML Export 15 Overview 15 Features 15 Platforms, Compilers, and Dependencies 16 Supported Platforms 16 Supported Compilers 17 Software Dependencies 18 Windows Installation 18 UNIX Installation 19 Package Contents 20 License Information 21 Enable Advanced Document Readers 21 Update License Information 21 Directory Structure 22 Definition of Terms 25 Chapter 2: Getting Started 27 Architectural Overview 27 Memory Abstraction 29 Enhance Performance 29 File Caching 29 Convert Files 29 Convert Files Out of Process 30 Configure Out-of-Process Conversions 31 Run Export Out of Process—Overview 33 Recommendations 34 Run Export Out of Process 34 Example—KVHTMLStartOOPSession 36 Example—KVHTMLEndOOPSession 36 Subfile Extraction 37 Convert Outlook Email without Using the Extraction API 37 Set Conversion Options 38 Set Conversion Options by Using the API 38 Explore Conversion Options with the Sample Programs 38 Templates 39 Use the Export Demo Program 41 Change Input/Output Directories 42 Set Configuration Options 43 Convert PDF Files 43 Convert Rotated Text 44 Convert Files 44 KeyView (12.6) Page 3 of 457 HTML Export SDK C and COM Programming Guide Use the C-Language Implementation of the API 45 Input/Output Operations 45 Convert Files 46 Multithreaded Conversions 47 Use the COM Implementation of the API 48 Sample Implementation 49 Define the htmserv Object 49 Sample Code 49 Part 2: Use the Export API 52 Chapter 3: Use the File Extraction API 54 Introduction 54 Extract Subfiles 55 Sanitize Absolute Paths 56 Extract Images 57 Recreate a File’s Hierarchy 57 Create a Root Node 57 Recreate a File’s Hierarchy—Example 58 Extract Mail Metadata 59 Default Metadata Set 59 Extract the Default Metadata Set 60 Extract All Metadata 60 Microsoft Outlook (MSG) Metadata 60 Extract MSG-Specific Metadata 61 Microsoft Outlook Express (EML) and Mailbox (MBX) Metadata 62 Extract EML- or MBX-Specific Metadata 62 Lotus Notes Database (NSF) Metadata 63 Extract NSF-Specific Metadata 63 Microsoft Personal Folders File (PST) Metadata 64 MAPI Properties 64 Extract PST-Specific Metadata 65 Exclude Metadata from the Extracted Text File 65 Extract Subfiles from Outlook Files 66 Extract Subfiles from Outlook Express Files 66 Extract Subfiles from Mailbox Files 66 Extract Subfiles from Outlook Personal Folders Files 66 Choose the Reader to use for PST Files 67 MAPI Attachment Methods 68 Open Secured PST Files 69 Detect PST Files While the Outlook Client is Running 69 Extract Subfiles from Lotus Domino XML Language Files 70 Extract .DXL Files to HTML 70 Extract Subfiles from Lotus Notes Database Files 71 System Requirements 71 Installation and Configuration 72 KeyView (12.6) Page 4 of 457 HTML Export SDK C and COM Programming Guide Windows 72 Solaris 72 AIX 5.x 73 Linux 73 Open Secured NSF Files 73 Format Note Subfiles 74 Extract Subfiles from PDF Files 74 Improve Performance for PDFs with Many Small Images 74 Extract Embedded OLE Objects 74 Extract Subfiles from ZIP Files 75 Default File Names for Extracted Subfiles 75 Default File Name for Mail Formats 75 Default File Name for Embedded OLE Objects 76 Chapter 4: Use the HTML Export API 77 Extract Metadata 77 Extract Metadata by Using the API 78 Use the C API 78 Use the COM interface 78 Extract Metadata by Using a Template File 78 Examples 79 $SUMMARYNN 79 $SUMMARY 79 $USERSUMMARY 80 Extract File Format Information 80 Use the C API 81 Use the COM interface 81 Convert Character Sets 81 Determine the Character Set of the Output Text 81 Guidelines for Character Set Conversion 82 Examples of Character Set Conversion 83 Document Character Set Can be Determined 83 Document Character Set Cannot be Determined 84 Set the Character Set During Conversion 84 Set the Character Set During File Extraction from a Container 85 Map Styles 85 Use the C API 86 Use a Template file 86 Use the COM interface 88 Use Style Sheets 88 Display Vector Graphics on UNIX and Linux 89 Search and Highlight Terms 90 Include Revision Information 90 Configure the Revision Title 92 Configure the Revision Style 92 Generate a Revision Summary 93 Extract Text from Text Boxes 93 KeyView (12.6) Page 5 of 457 HTML Export SDK C and COM Programming Guide Convert PDF Files 94 Use the pdf2sr Reader 94 Use a Graphic-Based Reader 95 Use the kppdfrdr Reader 95 Use the kppdf2rdr Reader 96 Specify the Graphic-based Reader 96 Convert PDF Files to Raster Images 96 Convert PDF Files to a Logical Reading Order 97 Logical Reading Order and Paragraph Direction 97 Enable Logical Reading Order 98 Use the C API 98 Use the formats_e.ini File 99 Generate a Table of Contents from PDF Bookmarks 100 Disable Bookmark Conversion 100 Convert Invisible Text 101 Toggle Invisible Text 101 Specify Opacity of Invisible Text 102 Convert Rotated Text 102 Control Hyphenation 103 Extract Custom Metadata from PDF Files 104 Convert Spreadsheet Files 105 Convert Hidden Text in Microsoft Excel Files 105 Convert Headers and Footers in Microsoft Excel 2003 Files 105 Specify Date and Time Format on UNIX Systems 105 Convert Very Large Numbers in Spreadsheet Cells to Precision Numbers 106 Extract Microsoft Excel Formulas 106 Set Minimum Image Size 108 Convert Presentation Files 108 Convert Presentation Files to Raster Images 108 Convert Presentation Files to a Logical Reading Order 109 Convert XML Files 109 Configure Element Extraction for XML Documents 109 Modify Element Extraction Settings 110 Use the C API 110 Modify Element Extraction Settings in the kvxconfig.ini File 111 Specify an Element's Namespace and Attribute 113 Add Configuration Settings for Custom XML Document Types 113 Show Hidden Data 114 Hidden Data in Microsoft Documents 114 Toggle Word Comment Settings in the formats_e.ini File 115 Toggle PowerPoint Slide Note Settings in the formats_e.ini File 116 Exclude Japanese Guide Text 116 Source Code Identification 116 Partitioning 117 Chapter 5: Sample Programs 119 Introduction 119 KeyView (12.6) Page 6 of 457 HTML Export SDK C and COM Programming Guide C Sample Programs 119 Compile the Visual Basic Sample Program 120 COM Sample Program 120 tstxtract 121 cnv2html 122 cnv2htmloop 123 onefile 124 index 125 io_samp 125 htmlini 125 callback 127 jvtree_demo 128 jstree 128 JVTree 129 Export Demo 129 Template Wizard 130 Convert Documents to HTML by Using the Template Wizard 130 Change the Output Directory 131 Modify a Template in the Wizard 131 comsamp 134 htmloop 135 Part 3: C API Reference 136 Chapter 6: File Extraction API Functions 137 KVGetExtractInterface() 137 fpCloseFile() 138 fpExtractSubFile() 138 fpFreeStruct() 140 fpGetMainFileInfo() 141 fpGetSubFileInfo() 142 fpGetSubFileMetaData() 143 fpOpenFile() 145 Chapter 7: File Extraction API Structures 147 KVCredential 147 KVCredentialComponent 148 KVExtractInterface 148 KVExtractSubFileArg 149 KVGetSubFileMetaArg 152 KVMainFileInfo 153 KVMetadataElem 154 KVMetaName 155 KVOpenFileArg 156 KVOutputStream 157 KVSubFileExtractInfo 157 KVSubFileInfo 158 KeyView (12.6) Page 7 of 457 HTML Export SDK C and COM Programming Guide KVSubFileMetaData 161 Chapter 8: HTML Export API Functions 163 KVHTMLGetInterfaceEx() 163 KVHTMLGetInterfaceEx2() 164 Example 165 fpConvertStream() 165 fpFileToInputStreamCreate() 168 fpFileToInputStreamFree() 169 fpFileToOutputStreamCreate() 169 fpFileToOutputStreamFree() 170 fpFreePartitionInfoList