Du får vist hjælpeindhold for version:

This article is applicable if you are installing AEM Forms on OSGi. For information, about installing AEM Forms on JEE, see the documentation in the Installing, Upgrading, and Clustering AEM Forms on JEE section in AEM Forms help and tutorials.

AEM Forms PDF Generator enables IT managers to centrally manage and control the creation of Adobe PDF documents throughout the enterprise. With it, employees can easily convert documents created within the organization to Adobe PDF files that can be viewed using the ubiquitous Adobe Reader® software. PDF Generator offers flexible deployment options, granular control over document properties, and feature sets that can meet the document conversion needs of every organization.

Prepare to install PDF Generator

Install third-party applications

The following list contains non-AEM Forms applications that PDF Generator can use for PDF generation on the server side. If you use any of these applications with PDF Generator, before configuring the PDF Generator, ensure that the supported non-AEM Forms applications and AEM Forms are installed on the same machine.  

  • Microsoft Office Word
  • Microsoft Office Excel
  • Microsoft Office PowerPoint
  • Adobe Acrobat DC Professional
  • WordPerfect X7
  • OpenOffice  

For more information about supported applications, see Software support for PDF Generator.

Converting native files from PDF Generator requires dismissing any initial registration, activation, and Improvement program dialogs with the option to not show them again.

Configure environment variables

If you installed the PDF Generator module and configured it to convert files to PDF, for some file formats, you must manually set an environment variable that contains the absolute path of the executable that is used to start the corresponding application. For example, environment variables listed in the following table:


Environment variable


JDK (64-bit)


C:\Program Files\Java\jdk1.7.0_25

JDK (32-bit)


C:\Program Files (x86)\Java\jdk1.7.0_25

Adobe Acrobat


C:\Program Files (x86)\Adobe\Acrobat 2015\Acrobat\Acrobat.exe



Note: You can leave the Notepad_PATH variable blank.



C:\Program Files (x86)\OpenOffice.org3

WordPerfect WordPerfect_PATH C:\Program Files (x86)\WordPerfect Office 12\Programs\wpwin12.exe


  • All environment variables and respective paths are case-sensitive.
  • JDK (64-bit), JDK (32-bit), and Adobe Acrobat (Windows only) are mandatory environment variables.
  • The environment variable OpenOffice_PATH is set to the installation folder instead of the path to the executable.
  • You do not need to set up the paths for Microsoft Office applications such as Word, PowerPoint, Excel,  and Project, or for AutoCAD. The Generate PDF service starts these applications automatically if they are installed on the server.
  • On Linux platform, OpenOffice must be installed as /root. If OpenOffice is installed as non-root, PDFG might not be able to convert OpenOffice documents.
  • If you are using OpenOffice on a UNIX-based system, run the following command to set the PATH variable:
    export OpenOffice_PATH=/opt/openoffice.org3

Configure Install the Ink and Handwriting service

For a Microsoft Windows Server 2012 install the Ink and Handwriting service. The service is required to open Microsoft PowerPoint files which use inking capabilities of Microsoft Office.

  1. Open the server manager by clicking the server manager icon from the Quick Launch tray.

  2. From the Features menu, click Add Features. Make sure that you select the Ink and Handwriting Services check box. 

  3. Select Features dialog box with Ink and Handwriting Services selected. Click Install and the service will be installed.

Install and Configure Acrobat for use with PDF Generator (Windows only)

PDF Generator uses non-AEM Forms applications to convert a file to a PDF document.If you are using Microsoft Windows, install Acrobat Pro DC. If you using Linux operating system, install OpenOffice.

  1. If an earlier version of Acrobat is installed, uninstall it by using Add or Remove Programs in the Windows Control Panel.

  2. Install Acrobat DC Pro by running the installer.

  3. Open Acrobat and select Edit > Preferences > Updater.

  4. Deselect Automatically install updates and click OK. Close Acrobat.

  5. Validate the Acrobat Installation:

    1. Navigate to a PDF file on your system and double-click it to open it in Acrobat. If the PDF file opens successfully, Acrobat is installed correctly.
    2. If the PDF file does not open correctly, uninstall Acrobat and reinstall it.


    Ensure that you dismiss all the Acrobat dialog boxes that are displayed after the Acrobat installation is completed and disable the automatic updates for Acrobat. Set the Acrobat_PATH environment variable to point to Acrobat.exe (For example, C:\Program Files (x86)\Adobe\Acrobat 2015\Acrobat\Acrobat.exe). After you start Acrobat for the first time, the dialog boxes for sign-in, welcome screen, and EULA appear. Dismiss these dialog boxes for all the users configured to use PDF generator.  

  6. Run PDF Generator utility batch file:  

    1. Open AEM Package Manager. The default URL is http://[server]:[port]/crx/packmgr/index.jsp

    2. Download the adobe-aemfd-pdfg-common-pkg-[version].zip file from Package Manager.  

    3. Unzip the downloaded file and navigate to the [extracted-zip-file]\jcr_root\etc\fd\pdfg\tools\adobe-aemfd-pdfg-utilities-3.1.2-win.zip\scripts folder.

    4. Run the following batch file from the command prompt with administrative privileges:



      The batch file also available in AEM Forms add-on package. You can extract the file from [AEM Forms add-on package]\jcr_root\etc\packages\day\cq60\fd\adobe-aemds-common-pkg-[version].zip\jcr_root\etc\packages\day\cq60\fd\adobe-aemfd-pdfg-common-pkg-[version].zip\jcr_root\etc\fd\pdfg\tools\adobe-aemfd-pdfg-utilities-[version].zip\scripts. For the latest package, see AEM Forms releases article.

      Acrobat is configured to run with PDF Generator.  

  7. Run system readiness tool to validate Acrobat installation. The tool checks if the machine is configured properly to run PDF Generator conversions and generates a report at the specified path. Perform the following steps to run system readiness tool:

    1. Navigate to the [extracted-adobe-aemfd-pdfg-common-pkg]\jcr_root\etc\fd\pdfg\tools\adobe-aemfd-pdfg-utilities-3.1.2-win.zip\srt folder and run the following command from the command prompt:

      cscript SystemReadinessTool.vbs [Path_of_reports_folder] en

    2. Navigate to [Path_of_reports_folder]. Open the SystemReadinessTool.html file. Verify the report and fix the mentioned issues.

    3. Open Microsoft Word and navigate to the Acrobat tab. Click Create PDF and perfrom a manual conversion.


      If the System Readiness Tool reports that the pdfgen.api file is not available in the acrobat plugins folder then copy the pdfgen.api file from the [AEM-Forms-add-on-package]\plugins\x86_win32 directory to the [Acrobat_root]\Acrobat\plug_ins directory.

Configure HTML to PDF conversion

The HTML to PDF conversion process is designed to use the settings from Acrobat that override the settings from PDF Generator.

PDF Generator provides the following routes or methods to convert HTML files to PDF:

  • Webkit
  • Acrobat WebCapture
  • PhantomJS


It is recommended to take the PhantomJS route for its capabilities to handle dynamic content and no dependencies on 32-bit libraries, 32-bit JDK, or additional fonts. Also, it does not require pseudo or root user access to run the conversion.

The default primary route for HTML to PDF conversion is Webkit. To change the conversion route:

  1. On AEM author instance, navigate to Tools > Forms > Configure PDF Generator.
  2. In the General Configuration tab, select the preferred conversion route from the Primary Route for HTML to PDF conversions drop-down.

Do the following configurations, applicable to your preferred conversion route, to enable HTML to PDF conversion.

Enable support for Unicode fonts (Webkit and Acrobat WebCapture only)


The HTML to PDF conversion fails if a zipped input file contains HTML files with double-byte characters in filenames. To avoid this problem, do not use double-byte characters when naming HTML files.

Copy the Unicode font to any of the following directories as appropriate for your system:

  • Windows
    • [Windows root]\Windows\fonts
    • [Windows root]\WINNT\fonts
  • UNIX
    • /usr/lib/X11/fonts/TrueType
    • /usr/openwin/lib/X11/fonts/TrueType
    • /usr/share/fonts/default/TrueType
    • /usr/X11R6/lib/X11/fonts/ttf
    • /usr/X11R6/lib/X11/fonts/truetype
    • /usr/X11R6/lib/X11/fonts/TrueType
    • /usr/X11R6/lib/X11/fonts/TTF
    • /Users/cfqauser/Library/Fonts
    • /System/Library/Fonts
    • /Library/Fonts
    • /Users/ + System.getProperty(<user name>, root) + /Library/Fonts
    • System.getProperty(JAVA_HOME) + /lib/fonts
    • /usr/share/fonts (Solaris)


  • Ensure that you read and accept the license. 
  • When you install new fonts to the fonts folder, restart the AEM Forms instance.

Additional settings on Linux, Solaris, and AIX (Webkit and Acrobat WebCapture only)

  • Install the latest version of 32-bit libcurl, libcrypto, and libssl libraries.
  • Ensure that the following path exist and point to the latest version of libraries:
    • /usr/lib/libcurl.so (or libcurl.a for AIX)
    • /usr/lib/libcrypto.so (or libcrypto.a for AIX
    • /usr/lib/libssl.so (or libssl.a for AIX)
  • Install 32-bit curl libraries. The forms engine searches for the libraries in the following order:
    1. libcurl.so
    2. libcurl.so.4
    3. libcurl.so.3 

Note: You need at least one of the above three libraries to be present.

  • Ensure that the following libraries exist and point to their latest 32-bit versions:
    • /usr/lib/libcurl.so (or libcurl.a for AIX), 
    • /usr/lib/libcrypto.so (or libcrypto.a for AIX) 
    • /usr/lib/libssl.so (or libssl.a for AIX) 
  • (Only for IBM WebSphere running on Linux, Solaris, or AIX) Perform the following steps to configure IBM SSL socket provider:   
  1. Create a copy of the java.security file. The default location of the file is [WebSpeher_installation_directory]\Appserver\java_1.7_64\jre\lib\security.
  2. Open the copied java.security file for editing.
  3. Change the default SSL socket factories to use the JSSE2 factories instead of default IBM WebSphere factories:
    File with default contents:
    WebSphere socket factories (in cryptosf.jar)

    File with modified contents:
    WebSphere socket factories (in cryptosf.jar)

  4. To enable AEM Forms server to use the updated java.security file, while starting the AEM Forms server, add the following java argument:
    -Djava.security.properties= [path of newly created java.security file].


  • Ensure that the directories /usr/lib/X11/fonts and /usr/share/fonts exists. If the directories do not exist, then use the ln command to create a symbolic link from /usr/share/X11/fonts to /usr/lib/X11/fonts and another symbolic link from /usr/share/fonts to /usr/share/X11/fonts. Also ensure that the courier fonts are available at /usr/lib/X11/fonts.
  • Ensure that all the fonts (Unicode and non-unicode) are available in the /usr/share/fonts or /usr/share/X11/fonts directory.
  • On RedHat Enterprise Linux 6.x, the courier fonts are not available, download the font-ibm type1-1.0.3.zip archive. Extract the archive at /usr/share/fonts. Create a symbolic link from /usr/share/X11/fonts to /usr/share/fonts. Delete all the .lst font cache files from the Html2PdfSvc/bin and /usr/share/fonts directories.
  • When you install new fonts to the fonts folder, restart the AEM Forms instance.

Additional settings on Linux, Solaris, and AIX (PhantomJS only)

Install 64-bit variant of libicudata.so.42 library for HTML to PDF conversion through PhantomJS. In addition, PhantomJS requires 64-bit variants of the following libraries. These libraries are typically installed with Linux distributions and do not require manual installation. However, ensure that these libraries are installed. If you find any library missing, you must install it manually.

  • linux-vdso.so.1  
  • libicudata.so.42 
  • libssl.so.10 
  • libcrypto.so.10 
  • libfontconfig.so.1 
  • libfreetype.so.6 
  • libjpeg.so.62 
  • libpng12.so.0 
  • libz.so.1 
  • libicui18n.so.42 
  • libicuuc.so.42 
  • libdl.so.2 
  • librt.so.1 
  • libpthread.so.0 
  • libstdc++.so.6 
  • libm.so.6 
  • libgcc_s.so.1 
  • libc.so.6 
  • ld-linux-x86-64.so.2 
  • libgssapi_krb5.so.2 
  • libkrb5.so.3 
  • lbcom_err.so.2 
  • libk5crypto.so.3 
  • libexpat.so.1 
  • libkrb5support.so.0 
  • libkeyutils.so.1 
  • libresolv.so.2 
  • libselinux.so.1 
  • libpcre.so.1 
  • liblzma.so.5

Do the following to find any missing libraries:

  1. Navigate to [crx-repository]/bedrock/svcnative/HtmlToPdfSvc/bin/.

  2. Run the following command to list all libraries that PhantomJS requires for HTML to PDF conversion.

    ldd phantomjs

    Run the following command to list missing libraries.

    ldd phantomjs | grep not

  3. Manually install the missing libraries.


OpenSSL is required to establish HTTPS connections.

Change the file block settings for Microsoft Office

Change the Microsoft Office trust center settings to enable PDFG to convert older versions of Microsoft office documents.

  1. Open a Microsoft Office application. For example, Microsoft Word. Navigate to File > Options. The options dialog box appears.


  2. Click Trust Center, and then click Trust Center Settings.

  3. In the Trust Center settings, click File Block Settings.

  4. In the File Type list, uncheck Open for the file type that you want to be converted by PDFG. To enable a file type for conversion with PDF Generator, the Open option must be deslected.   

Grant the Replace a process level token privilege (Windows only)

The User account used to start the application server should have the Replace a process level token privilege. The local system accounts have the Replace a process level token privilege by default. For the servers running with a user of Local Administrators group, the privilege must be granted explicitly. Perform the following steps to grant the privilege:  

  1. Open the Group Policy Editor for Microsoft Windows.  To open the Group Policy Editor, click Start, type gpedit.msc in the Start Search box, and then press ENTER.

  2. Navigate to Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment and edit the Replace a process level token policy and include the Administrators group.

  3. Add the user to the Replace a Process Level Token entry.

Configuring Windows installation (Microsoft Windows only)

During installation and Configuration of AEM Forms, disable the User Access Control (UAC) Window.  

Disable the Windows UAC

  1. To access the System Configuration Utility, go to Start > Run and then enter MSCONFIG.

  2. Click the Tools tab and scroll down and select Change UAC Settings.

  3. Click Launch to run the command in a new window.

  4. Adjust the slider to the Never notify level.

  5. When finished, close the command window and close the System Configuration window.

  6. Verify registry setting for UAC is set to 0 (zero). Peform the following steps to verify:  

    1. Open Microsoft Windows Registry editor. To open resgistry editor, go to Start > Run, type regedit, and click OK.

    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\. Ensure value of EnableLUA is set to 0 (zero).


      Microsoft recommends to back up the registry before you modify it. For detailed steps, see How to back up and restore the registry in Windows.

    3. Ensure value of EnableLUA is set to 0 (zero). If the value is not 0, change the value to 0. Close the registry editor.


  7. Restart your computer.

To enable the UAC again, repeat the steps above and adjust the slider to a desired level before restarting your computer.

Disable Windows Error Reporting  

While converting a document to PDF using PDF Generator on Windows Server, Windows may report that the executable has encountered a problem and needs to close. However, it does not impact the PDF conversion as it continues in the background.

To avoid receiving the error, you can disable the Windows error reporting. For more information on disabling error reporting, see http://technet.microsoft.com/en-us/library/cc754364.aspx.

Install and configure PDF Generator

Perform the following steps before you install and configure the Publish instance:

  1. Ensure that the adobe-aemfd-<operating system>-pkg [version] is installed on the AEM Forms instance.

  2. Open the Configuration Manager. http://[hostname]:[port]/system/console/configMgr

  3. Open the CQ-DAM-Handler-Gibson Font Manager Service and specify the path of the System Fonts, Adobe Server Fonts, and Customer Fonts directories.

  4. Open the AEM Forms PDF Generator configuration UI in a browser window:
    http://[hostname]:[ports] /libs/fd/pdfg/config/ui.html

  5. In the User Accounts tab, provide credentials of a local user account, and click Submit.


    You require a local user account to run the conversion. Keep a local user account handy. For steps to create a local user, see http://windows.microsoft.com/en-in/windows/create-user-account#create-user-account=windows-7.

  6. Open the AEM Forms PDF Generator configuration UI in a browser window and verify the local user account added in the previous step is reflected on the configuration UI.

  7. Add the following properties to the [crx-quickstart]\conf\sling.properties file:

    • sling.bootdelegation.class.com.rsa.jsafe.provider.JsafeJCE=com.rsa.*
    • sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.* 
  8. Restart AEM Forms instance.

Increase the maximum time-out value for ORB service

To increase the maximum time-out value, add properties to the Jacorb ORB provider OSGi configuration service. Perform the following steps to add the properties to the service:

  1. In AEM configuration manager, open the Jacorb ORB Provider service.


    The default URL to AEM configuration manager is http://[server]:[port]/system/console/configMgr.

  2. To configure the pending reply timeout (also known as, CORBA client timeout) to 600 seconds (600,000 millis), set value of the Custom Properties.name field to


    Click Save.

You can specify any number of such properties. These properties are merged with the defaults provided in the aemds-jacorb.properties file. The file is embedded in the ORB provider bundle and passed to Jacorb during initialization. Since the custom properties are specified via the OSGi configuration, so the properties persist and survive server restarts.

Enable a non-administrator user to run PDF Generator

You can enable a non-administrator user to use PDF Generator. Normally, only users with administrative privileges can use PDF Generator. Perform the following steps to enable a non-administrator user to run PDF Generator:

  1. Create an environment variable name PDFG_NON_ADMIN_ENABLED. For detailed steps, see create the environment variable on Windows.

  2. Set value of the variable to TRUE.

  3. Restart the AEM forms instance.

Enable multi-threaded file conversion

PDF Generator, by default, converts only one OpenOffice, Microsoft Word, or PowerPoint document at a time. You can enable multi-threaded conversions to allow PDF Generator to convert multiple documents concurrently. For more information, see Enabling multi-threaded file conversions.

Known issues

  • HtmltoPDF (webkit route) on Linux and Solaris has a dual dependency on openssl-0.9.x and openssl-1.0.x. This is a known issue that will be addressed by a formal patch but for the moment, it can be made to work with a workaround. For the workaround, see Addtional settings to use HTMLtoPDF (WebKit Route) on Linux and Solaris.
  • On updating the pdfg-core bundle, the following error can occure:  java.lang.UnsatisfiedLinkError: Cannot load native JNIWrapper library (jniwrap64.dll).
    To resolve the issue, restart the underlying AEM instance.