User Manual. 3-Heights PDF Producer API. Version 4.6



Similar documents
CAPIX Job Scheduler User Guide

Title Release Notes PC SDK Date Dealt with by, telephone. Table of Content GENERAL Corrected Issues PDD...

APPLICATION NOTE 1740 White Paper 6: 1-Wire Drivers Installation Guide for Windows

Virtuozzo Virtualization SDK

Python for Series 60 Platform

UniFinger Engine SDK Manual (sample) Version 3.0.0

INFUSION BUSINESS SOFTWARE Installation and Upgrade Guide

Migration Strategies and Tools for the HP Print Server Appliance

Title Release Notes PC SDK Date Dealt with by, telephone. Table of Content GENERAL... 2

FTP Client Engine Library for Visual dbase. Programmer's Manual

DataFlex Connectivity Kit For ODBC User's Guide. Version 2.2

Legal Notes. Regarding Trademarks. Models supported by the KX printer driver KYOCERA MITA Corporation

NI TestStand Version 2012

DiskPulse DISK CHANGE MONITOR

PMOD Installation on Linux Systems

Kofax Export Connector for Microsoft SharePoint

Pcounter Web Report 3.x Installation Guide - v Pcounter Web Report Installation Guide Version 3.4

Legal Notes. Regarding Trademarks. Model supported by the KX printer driver KYOCERA MITA Corporation

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

4D Plugin SDK v11. Another minor change, real values on 10 bytes is no longer supported.

MarkLogic Server. Connector for SharePoint Administrator s Guide. MarkLogic 8 February, 2015

Networking Best Practices Guide. Version 6.5

Athena Knowledge Base

Archive Attender Version 3.5

KofaxExpress. Installation Guide

Filestream Ltd. File Stream Document Management Integration Overview

Manuals for This Product

SimbaEngine SDK 9.4. Build a C++ ODBC Driver for SQL-Based Data Sources in 5 Days. Last Revised: October Simba Technologies Inc.

Using Microsoft Visual Studio API Reference

PMOD Installation on Windows Systems

FileMaker 11. ODBC and JDBC Guide

Installation Guide: Delta Module Manager Launcher

Out n About! for Outlook Electronic In/Out Status Board. Administrators Guide. Version 3.x

Windows PowerShell Essentials

Image Acquisition Toolbox Adaptor Kit User's Guide

Setting Up ALERE with Client/Server Data

KYOeasyprint 3. User Guide Version 1.0 1/18. This user guide refers to KYOeasyprint version 3. Liability

Iron Speed Designer Installation Guide

Freescale Semiconductor, I

SageCRM 6.1. What s New Guide

Implementing a SAS 9.3 Enterprise BI Server Deployment TS-811. in Microsoft Windows Operating Environments

Version Eight. Installation Guide

Server Edition Administrator s Guide

MS SQL Express installation and usage with PHMI projects

2012 Nolio Ltd. All rights reserved

Installation and Deployment

Eventlog to Syslog v4.5 Release 4.5 Last revised September 29, 2013

Virtual CD v10. Network Management Server Manual. H+H Software GmbH

White Paper. Configuration of Fabasoft Folio Printer Ports. Fabasoft Folio 2015 Update Rollup 2

TOSHIBA GA Printing from Windows

Core Protection for Virtual Machines 1

Expedite for Windows Software Development Kit Programming Guide

...2. Standard Installation...4. Example Installation Scenarios...5. Network Installation...8. Advanced Settings Product Requirements

Migrating to vcloud Automation Center 6.1

Education Software Installer 2011

User Document. Adobe Acrobat 7.0 for Microsoft Windows Group Policy Objects and Active Directory

DataCove. Installation Instructions for Search Plug-in for Microsoft Outlook 2007 & 2010 (All Users)

MS Active Sync: Sync with External Memory Files

Ad Hoc Transfer Plug-in for Outlook Installation Guide

Authoring for System Center 2012 Operations Manager

BarTender s.net SDKs

Network FAX Driver. Operation Guide

FAQ CE 5.0 and WM 5.0 Application Development

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Network Scanner Tool R3.1. User s Guide Version

SQL Server 2008 R2 Express Edition Installation Guide

StruxureWare Power Monitoring 7.0.1

Contents. Introduction. Chapter 1 Some Hot Tips to Get You Started. Chapter 2 Tips on Working with Strings and Arrays..

SEER-HD Database Administrator s Guide

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

How To Understand The Error Codes On A Crystal Reports Print Engine

Redirect Printer Port to LPT3 for Printing to Local Printer in Remote Desktop Session

EMC Documentum Application Connectors Software Development Kit

NovaBACKUP xsp Version 12.2 Upgrade Guide

WhatsUp Gold v16.3 Installation and Configuration Guide

Foxit Reader Deployment and Configuration

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Help on the Embedded Software Block

Witango Application Server 6. Installation Guide for Windows

Considerations for Mobile Application Development

Omgeo OASYS Workstation Installation Guide. Version 6.4 December 13, 2011

c360 Portal Installation Guide

Jet Data Manager 2012 User Guide

KX Driver User Guide

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

NVIDIA CUDA GETTING STARTED GUIDE FOR MICROSOFT WINDOWS

COM+ OVERVIEW OF MICROSOFTS COM, DCOM AND COM+ COMPONENT TECHNOLOGIES DCOM - COM+ Peter R. Egli INDIGOO.COM. indigoo.com. 1/20 Rev. 1.

Wise Package Studio 8.0 MR1 Release Notes

Appendix F: Instructions for Downloading Microsoft Access Runtime

Tutorial. Patch Management

Secret Server Installation Windows 8 / 8.1 and Windows Server 2012 / R2

ControlMaestro Upgrade guide

Release Bulletin EAServer for HP-UX Itanium and IBM AIX

System Administration Training Guide. S100 Installation and Site Management

Cyclope Print Management Software

FileMaker 12. ODBC and JDBC Guide

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

ResPAK Internet Module

Chapter 3 Software Installation

Transcription:

User Manual 3-Heights PDF Producer API Version 4.6

Contents 1 Introduction........................................................................ 2 1.1 Operating Systems................................................................... 2 1.2 Packages........................................................................... 2 1.2.1 Software Kits.................................................................... 2 1.2.2 Documentations................................................................. 2 1.3 Glossary............................................................................ 3 2 Installation Command Line Tool....................................................... 5 2.1 Command line parameters and error codes............................................... 5 3 Installation API..................................................................... 7 3.1 PdfPrnInstSetDefaultInfo....................................................... 7 3.2 PdfPrnInstExecuteCommand....................................................... 8 3.3 PdfPrnInstEnumPrinters......................................................... 9 3.4 PdfPrnInstEnumProcesses....................................................... 10 4 PDF Producer API................................................................. 10 4.1 C Interface......................................................................... 10 4.2 COM Interface...................................................................... 12 4.3 Sample Programs................................................................... 15 5 Office Converter API............................................................... 16 5.1 Interfaces.......................................................................... 16 5.1.1 COM Interface.................................................................. 16 5.1.2 C Interface..................................................................... 16 5.1.3.NET Interface.................................................................. 16 5.2 Sample Programs................................................................... 17 6 Licensing and Copyright........................................................... 17 7 Contact.......................................................................... 17 PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 1/17

1 Introduction This document describes: How to install the 3-Heights PDF and TIFF Producer with the provided command line tool How to install the 3-Heights PDF and TIFF Producer with the provided installation library How to install and use the Office Converter API 1.1 Operating Systems The 3-Heights PDF Producer API is available for the following operating systems: Windows Vista, 7, 8, 8.1, 10-32 and 64 bit Windows Server 2008, 2008 R2, 2012, 2012 R2-32 and 64 bit 1.2 Packages 1.2.1 Software Kits The 3-Heights PDF Producer comes in three different software kits. Software Kits Product Code Product Name Description CRED PDF Desktop Producer The standard version of the 3-Heights PDF Producer. Its installation is performed using Setup.exe. It provides a-ready-to-use MS Word plug-in. CREA, CREC PDF Producer Developer Kit The developer kit of the 3-Heights PDF Producer allows for creating custom plug-ins (e.g. a Word plug-in) using the producer-api. Its installation is performed using either installpdfproducer.exe or the OEM Installation API. CREB PDF Producer Runtime Kit Runtime kits are used for computers where a product is installed that was created using the PDF Producer Developer Kit. Compatibility Notes: Before the product CRED became available, the product code of the standard version of the PDF Producer was also CREA. In previous versions, the CRED was called PDF Producer (as Printer Driver), it was renamed to PDF Desktop Producer. 1.2.2 Documentations There are two manuals. PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 2/17

Manual Manual Product Name Description cred.pdf PDF Desktop Producer This documentation contain information mainly used by the end-user, such as: Installation uninstallation of the product on a desktop computer Configurations and document settings How to print from a Windows application Usage scenarios and printing application examples It is packaged into the CRED software kit or available for download here: http://www.pdf-tools.com/public /downloads/manuals/cred.pdf crea.pdf PDF Producer Developer Kit This documentation contains information for developers, such as: Installation Command Line Tool and deployment scenarios Installation API and integration into own installation programs The PDF Producer API The Office Converter API The Licensing interface It does not contain end-user and configuration information, for that please refer to the manual cred.pdf. It is packaged into the CREA software kit or available for download here: http://www.pdf-tools.com/public/downloads /manuals/crea.pdf Compatibility Note: In versions prior to 1.8.21.1 there was one documentation for all software kits, which was named crea.pdf and a separate add-on called crea_oem.pdf describing OEM interfaces. Old documentations are obsolete. 1.3 Glossary This chapter should provide a quick overview of the most important key words that are used in this documentation. Keyword Description PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 3/17

Printer In terms of the Windows operating system a printer is an object which can be accessed by a printing Windows application to create print jobs. Printers are listed in the window Devices and Printers of your system s Control Panel. Examples for names of printers: 3-Heights PDF Producer 3-Heights TIFF Producer HP Laser Jet 4050 Series PS Names of printers can be defined by the user. Commonly a printer is also referred to a hardware device that is able to print a hard copy of a file. However this type of printer is not meant in this manual. Printer Driver A printer driver is a piece of software that is used by the printer to translate data from the printing application (GDI) to a format that is understandable by the printer device. The most common formats are PostScript and PCL. 3-Heights PDF Producer Driver creates PDF. Printer drivers can be selected in the Advanced tab of a printer s property dialog. Multiple printers can use the same printer driver. Printer drivers often have the same name as the printer by which they are used. For that reason the terms printer and printer driver are confused frequently. Examples for names of Printer Drivers: 3-Heights PDF Producer Driver HP Laser Jet 4050 Series PS Names of printer drivers are given by the manufacturer. Port Every printer has a port. The port defines to where documents are sent, such as a printer port, or a file port. Examples for Ports: 3-Heights Port LPT1, LPT2, COM1, COM2 An IP address FILE Port Monitor Print Job A port monitor is a piece of software that is monitoring a port and processing data sent to that port. The 3-Heights PDF Port Monitor is monitoring the 3-Heights Port and saves the documents at the location that is configured in the port monitor and optionally post-processes them (e.g. opens them in a PDF viewing application). A print job is a series of pages that are printed as one job. When printing to a physical device, all pages of a print job are printed on paper before the next print job starts. When printing to the 3-Heights PDF Producer, all pages of the same print job are printed into the same PDF file. PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 4/17

2 Installation Command Line Tool For customers who want to deploy the PDF and TIFF Producer to various target systems in a batch process can use the Installation command line tool installpdfproducer.exe. The command line tool covers various usage scenarios such as Installation and uninstallation of the PDF and TIFF Producer Installation of PDF and TIFF Producer Drivers on a server only Cross platform installation X86 and X64 on the same server Add and remove of virtual printers with different setting sets and ports Add and remove of ports to a virtual printer Create a port pool for a virtual printer on a server Configuring port parameters A typical call would be: C> installpdfproducer.exe -p "Prompt=True" -cp 4 install This call installs the PDF Producer, creates a pool of 4 ports and checks the Prompt for file name checkbox. The executable comes as a 32 and a 64 bit application and uses the installation API PdfPrnInstAPI.dll which is described in the next chapter. The SDK contains the sub-directories X86 and X64 which contain the programs and DLLs for the corresponding platform. Each executable can only be run on the platform for which it is compiled. Running the 32 bit executable on an X64 platform will cause an error. The executable requires that the driver DLLs of the own platform are contained in the same directory otherwise the installation will fail. If the cross platform installation requested (through the corresponding option) the drivers in the corresponding sibling directory..\x86 or..\x64 must be present as well. 2.1 Command line parameters and error codes The command line tool supports various parameters to instruct the tool what the users intends to do. There are two types of parameters: options and commands. An option is preceded by a dash whereas the dash is missing for a command. Only one command can be present on a command line. The following commands are supported Command Install Uninstall AddDriver DeleteDriver AddPrinter DeletePrinter Description Perform a full installation Perform a full uninstallation Install the drivers only without printers and ports Remove the drivers Add a printer with the drivers already installed Delete a printer object and leave the drivers PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 5/17

AddPort DeletePort SetPortConfig List Add a port to an existing printer Remove a port from an existing printer Set the configuration information of a port List all PDF and TIFF Producer printers The following options are supported Option -cp portcount Description Create a port pool with the specfied number of ports -d Set as default printer -nd descr -npr name -npt name Set the printer description Printer name (e.g. 3-Heights(TM) PDF Producer) Port name (e.g. DocPort0:) -p param=value Port configuration parameters (see below) -t Use TIFF Producer (Default: PDF Producer) -x Install cross platform drivers (x86, x64) -v Verbose mode The port configuration parameters, a string of comma separated key/value pairs Key/Value Pair OutputFolder= path Command= command Unique=true/false Prompt=true/false RemovePrefix=true/false AddTime=true/false AddUser=true/false Description The path of the document output folder The command to execute after the document creation Make the file names unique Display the prompt dialog Remove MS Office prefixes in file names Add the current time to the file name Add the current user to the file name The tool returns the following codes PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 6/17

Return Code Description 0 Success 3 Invalid parameter or switch 4 Command failed (a detailed error message is printed to stderr) 5 Some applications have locked at least one of the driver modules 3 Installation API For customers who want to write their own installation program, e.g. in an OEM scenario, can use the installation API. The API is simple to use and support various installation and configuration scenarios. PdfPrnInstAPI.dll provides a C interface to install and uninstall the 3-Heights PDF Producer API and TIFF Producer. The declarations of the interface are contained in the file pdfprninstapi_c.h. The file PdfPrnInstAPI.lib contains the linker stub library. The interface uses the C standard calling convention und supports the UNICODE character set. The MCBS character set is not supported by this module. A typical call sequence is to install the PDF Producer, set the port configuration to display the prompt dialog, and set the printer as the default printer: PDFPRN_INSTALL_INFO info; PdfPrnInstSetDefaultInfo(&info, etechnologypdf); BOOL bok = PdfPrnInstExecuteCommand(&info, "Prompt=True", 1, eflagsetdefaultprinter); if (!bok) { fwprintf(stderr, info.szerrormessage); } 3.1 PdfPrnInstSetDefaultInfo Method: BOOL PdfPrnInstSetDefaultInfo(struct PDFPRN_INSTALL_INFO* pinfo, TPdfPrnTechnology itechnology) The function initializes the installation information structure for being used by the PdfPrnInstExecute function depending on the technology parameter. The installation information structure contains the name of the printer object etc. The names can be overwritten by the application as required. Parameters: pinfo [struct PDFPRN_INSTALL_INFO*] The installation information structure. itechnology [TPdfPrnTechnology] The driver technology, one of the following constants: PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 7/17

etechnologypdf etechnologytiff Returns: FALSE If a parameter is not valid the function returns FALSE. The last error code is set to ERROR_INVALID_PA- RAMETER in this case. TRUE Otherwise. 3.2 PdfPrnInstExecuteCommand Method: BOOL PdfPrnInstExecuteCommand(struct PDFPRN_INSTALL_INFO* pinfo, TPdfPrnInstCommand icommand, const WCHAR* szparams, int nports, int iflags) The function performs the installation or uninstallation according to the installation command and based on the information contained in the installation information structure. The installation information defines the technology, the platform, the names of the objects and the paths to the required DLLs. If the information is not correct the function fails. Parameters: pinfo [struct PDFPRN_INSTALL_INFO*] The installation information structure. icommand [TPdfPrnInstCommand] the installation command, one of the following constants: ecommandinstall ecommanduninstall ecommandadddriver ecommanddeletedriver ecommandaddprinter ecommanddeleteprinter ecommandaddport ecommanddeleteport ecommandsetportconfig ecommandenumprinters Perform a full installation Perform a full uninstallation Install the drivers only without printers and ports Remove the drivers Add a printer with the drivers already installed Delete a printer object and leave the drivers Add a port to an existing printer Remove a port from an existing printer Set the configuration information of a port Enumerate all Producer printers szparams pairs: [const WCHAR*] The port configuration parameters, a string of comma separated key/value PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 8/17

OutputFolder= path Command= command Unique= true/false Prompt= true/false RemovePrefix= true/false AddTime= true/false AddUser= true/false The path of the document output folder The command to execute after the document creation Make the file names unique Display the prompt dialog Remove MS Office prefixes in file names Add the current time to the file name Add the current user to the file name nports iflags [int] the number of ports to install. [int] the installation function instruction flags, a combination of the following constants: eflagcrossplatform eflagsetdefaultprinter Install cross platform, e.g. x64 on x86 Set the installed printer as the default printer Returns: FALSE If a parameter is not valid the function returns FALSE. The last error code is set to ERROR_INVALID_PA- RAMETER in this case. If the function fails it returns FALSE and sets the last error code. A descriptive error message is contained in the error message field of the installation information structure. TRUE If the function succeeds. 3.3 PdfPrnInstEnumPrinters Method: int PdfPrnInstEnumPrinters(struct PDFPRN_INSTALL_INFO* pinfo, struct PDFPRN_ENUM_RESULT* presult, size_t nsize, size_t* nneededsize) The function lists the printer objects with its associated driver, port and print processor names. In order to determine the size of the result variable the function must first be called with a size value of zero. The needed size is then used to allocate the result variable which can be used as a parameter to the second call. Parameters: pinfo [struct PDFPRN_INSTALL_INFO*] The installation information structure. presult [struct PDFPRN_ENUM_RESULT*] The array of result structures. nsize [size_t] The size of the result variable in bytes. nneededsize [size_t*] The needed size of the result variable in bytes. Returns: -1 (minus one) If the function fails PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 9/17

If the function succeeds it returns the number of entries in the result array. 3.4 PdfPrnInstEnumProcesses Method: int PdfPrnInstEnumProcesses(struct PDFPRN_INSTALL_INFO* pinfo, WCHAR** szmodulenames, size_t nsize, size_t* nneededsize) The function lists the module names which lock any of the driver DLLs and must be closed to install or uninstall the requested drivers. In order to determine the size of the result variable the function must first be called with a size value of zero. The needed size is then used to allocate the result variable which can be used as a parameter to the second call. Parameters: pinfo [struct PDFPRN_INSTALL_INFO*] The installation information structure. szmodulenames [WCHAR**] The array of module name strings. nsize [size_t] The size of the result variable in bytes. nneededsize [size_t*] The needed size of the result variable in bytes. Returns: -1 (minus one) If the function fails If the function succeeds it returns the number of entries in the result array. 4 PDF Producer API The PDF Producer API is a component which provides programmatic access to various features of the PDF and TIFF producer. The main functions are: Create and remove ports Get and set the port configuration Get and set the printer settings Add XMP metadata to a PDF document There exists a C interface and a COM interface. The C interface provides access to the PDF and the TIFF Producer whereas the COM interface is restricted to the PDF Producer. The interface is documented in the C header file PdfProducerAPI_c.h. The COM interface methods and properties are contained in the PdfProducerAPI.idl file. Both files are contained in the software distribution kit. 4.1 C Interface /** * @brief This function gets the configuration data of a specific port. PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 10/17

* * @param szname The port's name. * @param pconfig The configuration structure. * @return 0 if succeeded, last error if failed. */ PDFPRODUCERAPI int PDFPRODUCERCALL PdfProducerGetPortConfigurationW(const WCHAR* szname, struct CONFIGURE_PORT_INFOW* pconfig); /** * @brief This function sets the configuration data of a specific port. * * @param szname The port's name. * @param pconfig The configuration structure. If NULL then the configuration * is cleared. * @return 0 if succeeded, last error if failed. */ PDFPRODUCERAPI int PDFPRODUCERCALL PdfProducerSetPortConfigurationW(const WCHAR* szname, const struct CONFIGURE_PORT_INFOW* pconfig); /** * @brief This function gets the user settings of a specific printer. * * @param szprinter The printer's name. * @param pdevmode The device mode. * @param nsize The size of the device mode structure. * @return 0 if succeeded, last error if failed. */ PDFPRODUCERAPI int PDFPRODUCERCALL PdfProducerGetPrinterSettingsW(const WCHAR* szprinter, struct DEVMODEW* pdevmode, size_t nsize); /** * @brief This function sets the user settings of a specific printer. * * @param szprinter The printer's name. * @param pdevmode The device mode. * @param nsize The size of the device mode structure. * @return 0 if succeeded, last error if failed. */ PDFPRODUCERAPI int PDFPRODUCERCALL PdfProducerSetPrinterSettingsW(const WCHAR* szprinter, const struct DEVMODEW* pdevmode, size_t nsize); ////////////////////////////////////////////////////////////////////////////// typedef struct _TPdfPrnDataHandle* TPdfPrnDataHandle; /** * @brief Create a data object (using data name "XMP"). * The data object must be created before a print job is started. * @param szusername The name of the printing user * @param szdocumentname The name of the printed document * @return The handle to the data object */ PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 11/17

PDFPRODUCERAPI TPdfPrnDataHandle PDFPRODUCERCALL PdfPrnCreateData(const WCHAR* szusername, const WCHAR* szdocumentname); /** * @brief Create a data object given a data name (e.g. "XMP", "Links"). * The data object must be created before a print job is started. * @param szusername The name of the printing user * @param szdocumentname The name of the printed document * @param szdataname The type of the data object (currently only "XMP" is * supported) * @return The handle to the data object */ PDFPRODUCERAPI TPdfPrnDataHandle PDFPRODUCERCALL PdfPrnCreateData2(const WCHAR* szusername, const WCHAR* szdocumentname, const WCHAR* szdataname); /** * @brief Destroy a data object. * The data object must be closed after the corresponding print job has * started. * @param handle The handle to the data object */ PDFPRODUCERAPI void PDFPRODUCERCALL PdfPrnCloseData(TPdfPrnDataHandle handle); /** * @brief Writes data to the object. * All data must be written before the corresponding print job is started. * @param handle The handle to the data object * @param pdata A pointer to the data buffer * @param nsize The size of the data buffer * @return The number of bytes written; 0 if the function fails */ PDFPRODUCERAPI size_t PDFPRODUCERCALL PdfPrnWriteData(TPdfPrnDataHandle handle, const void* pdata, size_t nsize); 4.2 COM Interface typedef enum TPDFConformance { epdfconformancepdf14 = 1, epdfconformancepdf15, epdfconformancepdf16, epdfconformancepdf17, epdfconformancepdfa1b, epdfconformancepdfa2u, epdfconformancepdfa3u } TPDFConformance; import "oaidl.idl"; import "ocidl.idl"; [ uuid(1ed16cb4-3849-4c49-9d2e- PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 12/17

C6A2ECE8E2B0), version(1.0), helpstring("3-heights(tm) Pdf Producer API 2.0") ] library PdfProducerAPILib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ object, uuid(a8e6be77-8fb0-4e67-8118-e43aa8db3726), dual, nonextensible, helpstring("ipdfprinter Interface"), pointer_default(unique) ] interface IPdfPrinter : IDispatch { [propget, id(1), helpstring("the name of a stamp control file (XML).")] HRESULT bstrstampfilename([out, retval] BSTR* pval); [propput, id(1), helpstring("the name of a stamp control file (XML).")] HRESULT bstrstampfilename([in] BSTR newval); [propget, id(2), helpstring("linearize the output file")] HRESULT Linearize([out, retval] VARIANT_BOOL* pval); [propput, id(2), helpstring("linearize the output file")] HRESULT Linearize([in] VARIANT_BOOL newval); [propget, id(3), helpstring("the name of a background stamp control file (XML).")] HRESULT BGStampFileName([out, retval] BSTR* pval); [propput, id(3), helpstring("the name of a background stamp control file (XML).")] HRESULT BGStampFileName([in] BSTR newval); [propget, id(4), helpstring("conformance level of the PDF output file.")] HRESULT Conformance([out, retval] TPDFConformance* pval); [propput, id(4), helpstring("conformance level of the PDF output file.")] HRESULT Conformance([in] TPDFConformance newval); }; [ object, uuid(52022abc-4662-4f96-b8d4-af8d2068d623), dual, nonextensible, helpstring("ipdfport Interface"), pointer_default(unique) ] interface IPdfPort : IDispatch { [propget, id(1), helpstring("the output folder")] HRESULT Directory([out, retval] BSTR* pval); [propput, id(1), helpstring("the output folder")] HRESULT Directory([in] BSTR newval); [propget, id(2), helpstring("add a postfix to make file names unique")] HRESULT MakeFileNamesUnique([out, retval] VARIANT_BOOL* pval); PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 13/17

[propput, id(2), helpstring("add a postfix to make file names unique")] HRESULT MakeFileNamesUnique([in] VARIANT_BOOL newval); [propget, id(3), helpstring("remove Microsoft Prefix from file name")] HRESULT RemovePrefixes([out, retval] VARIANT_BOOL* pval); [propput, id(3), helpstring("remove Microsoft Prefix from file name")] HRESULT RemovePrefixes([in] VARIANT_BOOL newval); [propget, id(4), helpstring("prompt for the output file name")] HRESULT PromptFileName([out, retval] VARIANT_BOOL* pval); [propput, id(4), helpstring("prompt for the output file name")] HRESULT PromptFileName([in] VARIANT_BOOL newval); [propget, id(5), helpstring("execute the command line")] HRESULT ExecuteCommand([out, retval] VARIANT_BOOL* pval); [propput, id(5), helpstring("execute the command line")] HRESULT ExecuteCommand([in] VARIANT_BOOL newval); [propget, id(6), helpstring("add the date and time to the output file name")] HRESULT AddTimeStamp([out, retval] VARIANT_BOOL* pval); [propput, id(6), helpstring("add the date and time to the output file name")] HRESULT AddTimeStamp([in] VARIANT_BOOL newval); [propget, id(7), helpstring("add the user name to the output file name")] HRESULT AddUser([out, retval] VARIANT_BOOL* pval); [propput, id(7), helpstring("add the user name to the output file name")] HRESULT AddUser([in] VARIANT_BOOL newval); [propget, id(8), helpstring("the command line to be executed")] HRESULT Command([out, retval] BSTR* pval); [propput, id(8), helpstring("the command line to be executed")] HRESULT Command([in] BSTR newval); [propget, id(9), helpstring("the output file name")] HRESULT FileName([out, retval] BSTR* pval); [propput, id(9), helpstring("the output file name")] HRESULT FileName([in] BSTR newval); [id(10), helpstring("clears the user configuration")] HRESULT Clear([out,retval] VARIANT_BOOL* pdone); }; [ object, uuid(de8861cc-0392-49ef-91d8-770841d23839), dual, helpstring("ipdfproducer Interface"), pointer_default(unique) ] interface IPdfProducer : IDispatch { [propget, id(1), helpstring("the port")] HRESULT Port([in] BSTR bstrportname, [out, retval] IPdfPort** pval); [propget, id(2), helpstring("get the printer object")] HRESULT Printer([in] BSTR bstrprinter, [out, retval] IPdfPrinter** pval); }; [ uuid(c125c4b2-2023-40ba-8253-55aee71ca964), PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 14/17

helpstring("pdfprinter Class") ] coclass PdfPrinter { [default] interface IPdfPrinter; }; [ uuid(577bde2c-c551-431e-ad2d-5dda9a4290a5), helpstring("pdfport Class") ] coclass PdfPort { [default] interface IPdfPort; }; [ uuid(3b0318e9-0fbb-43fc-9595-8b8dda9d5727), helpstring("pdfproducer Class") ] coclass PdfProducer { [default] interface IPdfProducer; }; }; 4.3 Sample Programs Here s a list of sample programs that show various capabilities of the PDF Producer API. Sample C\AddXMPMetadata C\GDISample C\PipeSample C\PlayEMFSample VB\PrinterSample VB.NET\PrintDocument VBA\*.xls VBS\*.vbs Description Add a XMP Metadata packet to the PDF file Create a PDF file using Windows GDI calls Create a PDF file in memory Convert an EMF file to a PDF file Use the VB intrinsic printing to create a PDF file Use the VB.NET language to create a PDF file Use a VBA script in an Excel to create a PDF file Use the VB Script language to perform various tasks The samples can be found in the software distribution kit. PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 15/17

5 Office Converter API The Officer Converter API is used to programmatically convert office documents to PDF documents. It can be accessed via the following interfaces: COM, C,.NET. This means it can be used from Visual Basic, Visual Basic Script, C#, C, etc. It requires the native applications (e.g. MS Office 2010) to be installed locally. 5.1 Interfaces The native library of the Office Converter API is OfficeConverterAPI.dll, it is used by all interfaces. 5.1.1 COM Interface Before you can use the Office Converter API component in your COM application program you have to register the component using the regsvr32.exe program that is provided with the Windows operating system. The registration command requires administrator privileges and looks like this: C:\> regsvr32 OfficeConverterAPI.dll Upon registering a dialog box is displayed that informs whether it was successful or not. In order to register silently, e.g. for deployment, you can use the switch /s. 5.1.2 C Interface The header file officeconverterapi_c.h needs to be included in the C/C++ program. The Object File Library lib\officeconverterapi.lib must to be linked to the project. OfficeConverterAPI.dll must be included in the environment variable PATH or, if using MS Visual Studio, in the directory for executable files. 5.1.3.NET Interface The Office Converter API does not provide a pure.net solution. Instead, it consists of a.net assembly, which is added to the project and a native DLL which is called by the.net assembly. This has to be accounted for when installing and deploying the tool. The.NET assembly (OfficeConvertNET.dll) is to be added as references to the project. It is required at compilation time. OfficeConverterAPI.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 OfficeConverterAPI.dll is called by the.net assembly OfficeConverterNET.dll. OfficeConverterAPI.dll must be found at execution time by the Windows operating system. There are various approaches to ensure this. Below two are listed: OfficeConverterAPI.dll is copied to a directory that is on the environment variable "PATH". e.g. it is either copied to a new dedicated directory, which is then added to the "PATH", or an existing directory which already is on the "PATH", such as %SystemRoot%\System32\ (e.g. C:\Windows\System32\). This approach is usually used for development. PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 16/17

OfficeConverterAPI.dll is copied to the directory where the compiled executable resides. This approach is usually used for deployment. 5.2 Sample Programs There is sample code available in different programming languages. Please refer to: samples\cs.net\convert.cs and samples\vbs\convert.vbs which are contained in the software distribution kit. 6 Licensing and Copyright The 3-Heights PDF Producer API is copyrighted. This user s manual is also copyright protected; it may be copied and given away provided that it remains unchanged including the copyright notice. 7 Contact PDF Tools AG Kasernenstrasse 1 8184 Bachenbülach Switzerland http://www.pdf-tools.com pdfsales@pdf-tools.com PDF Tools AG Premium PDF Technology 3-Heights PDF Producer API, January 22, 2016 17/17