Getting Started

System requirements

The following operating systems and compilers are supported by PDFL 18.0.5:

Platform

Processor

Compiler

Additional OS

Windows-10 32-bit and 64-bit

Intel

Visual Studio 2017 (version 15.3.3)

Win 8.1

Linux 64-bit (CentOS 7.3)

Intel

Clang 3.9.1, glibc 2.17

n/a

Mac 64-bit (Mac OS X 10.12)

Intel

XCode 8.2.1

Mac OS X 10.11, Mac OS X 10.15

Note

Windows 7 support is discontinued. While it may be possible to use the library in other development environments, such use is not supported by Adobe. The PDF Library has been tested only with the compiler versions listed in the table above.

Download

The Windows and Mac installers are available at https://developer.adobe.com/console/servicesandapis. Download, unzip, and install.

Install

Windows

The following two archives are shipped for Microsoft Windows:

  • AdobePDFLSDKMinSize18.0.5.zip - For standard version of the PDF Library SDK.

  • AdobePDFLSDKMaxSpeed18.0.5.zip - For the speed-optimized version of the PDF Library SDK.

  1. Verify the signature of the ZIP file:

    1. Install JDK (preferably JDK 1.6 or higher) on your machine.

    2. From the bin folder of the JDK installation, execute the following command: jarsigner.exe –verify [-verbose -certs] %ZIP_File_Path%

Note

The following parameters are optional: {-verbose, -certs}

  1. Unzip the preferred ZIP file: Important: If both the above variants need to exist on the disk, extract them to separate locations.

    • For standard version of the PDF Library SDK, use AdobePDFLSDKMinSize18.0.5.zip.

    • For the speed-optimized version of the PDF Library SDK, use AdobePDFLSDKMaxSpeed18.0.5.zip.

  2. To ensure that applications run successfully outside the Microsoft Visual Studio C++ .NET IDE, verify the executable can find the dynamic linked libraries at run time:

  1. Copy the libraries supplied in the Libs folder to the folder where your executable resides.

  2. Place the path for the libraries into the PATH environment variable.

  1. To ensure that the plugins run successfully:

    1. Copy the libraries supplied in the Plugins[PLUGIN_NAME]Libs folder to the folder where your executable resides.

    2. Place the path for the libraries into the PATH environment variable.

  2. Include the PDFLInitCommon.cpp file available in Include/Source folder to enable C++ Exception Handling across multiple HFT calls.

Note: Executing SnippetRunner in UI mode (64-bit): You must explicitly set the 64BitMode parameter to 1 in the pdflsdk.config file in your home directory. This variable is initialized to 0 (zero) by default.

Mac

The DMG file, AdobePDFLSDK18.0.5.dmg, is shipped for the Mac platform. To install:

  1. Verify the AdobePDFLSDK18.0.5.dmg. From 18.0.2 onwards, the signing process on Mac platform has been changed. Now, SIG file is not required. To view the signature of the DMG file, you can use the following codesign command: codesign –dvv $DMG_File_Path.

codesign –dvv AdobePDFLSDK18.0.5.dmg

Note

The signature information appears. If it is unsigned, “code object is not signed” appears.

  1. Mount the DMG image for AdobePDFLSDK18.0.5.dmg.

  2. Copy the AdobePDFLSDK18.0.5 folder to a local drive.

By default, all libs are present under the AdobePDFLSDK18.0.5/Libs/folder; categorized under mac_x64 for 64-bit target configuration. Aliases or proper paths must be set to ensure that the sample applications run properly.

UNIX

  1. Copy the file AdobePDFLSDK18.0.5.tar.gz to a directory.

  2. Run the following command in the directory that you want to unpack the SDK: gunzip < AdobePDFLSDK18.0.5.tar.gz | tar xvf

  3. Change directory to AdobePDFLSDK18.0.5/Samples/utils and modify the appropriate .mak file to point to your installed Clang directory and static library directories.

  4. Set the environment variable LD_LIBRARY_PATH to point to AdobePDFLSDK18.0.5/Libs/linux_x64/ folder

Before you can build your product on a Linux platform running the CentOS 7.3 operation system, you must procure the Clang compiler. We recommend using version 3.9.1 or later and keeping the compiler in the directory: /opt/llvm/.

Tip

For linux platform, new libraries libc++, libc++abi and libunwind are now included along with the existing libraries libgcc and libstdc++ in the packaging and makefiles for samples has been updated for the same. These libraries are released in AdobePDFLSDK18.0.5/Libs/linux_64/ folder.

Path modification

Because some samples require font, CMap, unicode, or color profile files, modify the MyPDFLibUtils.cpp file with the folder paths on your system.

For example, PDFLInitHFT()’s function calls PDFLGetDirList, PDFLGetCMapDir, PDFLGetUnicodeDir, and PDFLGetColorProfileDirList to locate the font, CMap ,unicode, color profile files on your system when they pass PDFLDataRec’s dirList, cMapDirectory, unicodeDirectory, and colorProfileDirList members.

Directory structure

The following is the directory structure for all platforms:

/AdobePDFLSDK18.0.5
    /Docs
    /Include
        /Headers
        /Source
    /Libs/PLATFORM
    /Plugins
        /Flattener
            /Include
            /Libs/PLATFORM
            /Samples
        /PDFProcessor
            /Include
            /Libs/PLATFORM
            /Samples
        /XPS2PDF
            /Include
            /Libs/PLATFORM
            /Resource
            /Samples
    /Resource
    /Samples/SAMPLE_NAME

Best practices

General

  • Examine, compile, and run the relevant code samples or snippets for your platform. The code samples and the SnippetRunner reside in the AdobePDFLSDK18.0.5/samples directory.

  • On all platforms, read the comments in the source code before compiling and running the sample to understand the functionality demonstrated by the sample.

Required best practices

  1. All PDFLSDK API calls should go from Host Function Table (HFT). To enable HFT, all projects should be initialized with PDFLInitHFT and should be terminated with PDFLTermHFT APIs respectively. Host Function Table (HFT) has been in place since PDFL 7.0 and all new APIs added after 7.0 are accessible through HFT only.

  2. From 18.0 onwards, all PDFLSDK client projects should enable C++ based Exception Handling. To achieve that kindly set USE_CPLUSPLUS_EXCEPTIONS_FOR_ASEXCEPTIONS flag to 1.

  3. To enable HFT and C++ based Exception Handling efficiently, please include the platform specific project-setting files available in Samples/utils folder.

  4. Samples are tested and built with the valid values in the PDFLDataRecstructure. If you do not have the valid font, CMap, unicode, or color profile folders on your system, samples may crash or throw an exception. You must either install the font and color profile files in the correct folder or you must pass NULL to these members for the PDF library not to look for the fonts or color profile files.

Additional documentation

  • PDF Reference, sixth edition, version 1.7 (Nov. 2006)

  • PDF Redaction: Addendum to the PDF Reference, sixth edition, version 1.7

  • Errata for the PDF Reference, sixth edition, version

  • Adobe Supplement to the ISO 32000, BaseVersion 1.7, ExtensionLevel 3 (for Acrobat XI)

3rd party software notices and TOU

Copyright 2022 Adobe Systems Incorporated and its licensors. All rights reserved. Adobe and the Adobe logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

This product contains either BSAFE and/or TIPEM software by RSA Security, Inc. Portions utilize Microsoft Windows Media Technologies. Copyright (c) 2006 Microsoft Corporation. All Rights Reserved.

Notices, terms and conditions pertaining to other third party software are located at https://www.adobe.com/go/thirdparty/ and incorporated herein by reference.