Skip to main content
Version: Version 1.5

General technical notes

This documentation explains how the Pdftools SDK interacts with your local operating system to locate fonts, locate color profiles, and to store temporary files and cache files.

Locating fonts

Some Pdftools SDK features require fonts to be installed locally.

For example, the PDF/A standard requires all fonts to be embedded in the PDF file. If non-embedded fonts are used in the original PDF, the fonts must be embedded during conversion to PDF/A. To embed fonts, a matching font has to be located in the font directories.

Font directories

The location of the font directories depends on the operating system.

Font directories are traversed recursively in the order specified. If two fonts with the same name are found, the latter takes precedence, i.e. user fonts always take precedence over system fonts.

Installing fonts in Windows

When a font is installed, it is installed by default only for a particular user. It is important to either install fonts for all users or make sure the Pdf Tools SDK is run under that user and the user profile is loaded.

The font directories for Windows are:

  1. %SystemRoot%\Fonts
  2. User fonts listed in the registry key \HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Fonts. This includes user specific fonts from C:\Users\<user>\AppData\Local\Microsoft\Windows\Fonts and app specific fonts from C:\Program Files\WindowsApps
  3. Fonts directory, which must be a direct subdirectory of where PdfToolsSdkAPI.dll resides.

The directories are transversed recursively in this order.

Font cache

A cache of all fonts in all font directories is created. If fonts are added or removed from the font directories, the cache is updated automatically.

To achieve optimal performance, make sure that the cache directory is writable for the Pdftools SDK. Otherwise, the font cache cannot be updated and the font directories have to be scanned on each program startup.

The font cache is created in the subdirectory <CacheDirectory>/Installed Fonts of the cache directory.

Locating color profiles

If no color profiles are available, default profiles for both RGB and CMYK are generated on the fly by the Pdftools SDK. If no specific color profiles are set, default profiles are used. By default, the SDK uses the color profile "sRGB Color Space Profile.icm" for device RGB colors, and "USWebCoatedSWOP.icc" for device CMYK. It searches for these profiles in the specified directories:

  1. %SystemRoot%\System32\spool\drivers\color
  2. directory Icc, which must be a direct sub-directory of where the PdfToolsSdkAPI.dll resides.

Most systems have pre-installed color profiles. For example, on Windows at %SystemRoot%\sys- tem32\spool\drivers\color\.

You can download color profiles from the links provided in the bin\Icc\ directory or from these websites:

Special Directories

Special directories are used by the Pdftools SDK during file processing. For optimal performance, the application should have write access to these directories.

Temporary files directory

The directory of temporary files is used for data specific to one instance of a program. The data is not shared between different invocations and is deleted after the program is terminated. The directory is determined as follows. The product checks for the existence of environment variables in the following order and uses the first path found:

  1. The path specified by the %TMP% environment variable.
  2. The path specified by the %TEMP% environment variable.
  3. The path specified by the %USERPROFILE% environment variable.
  4. The Windows directory.

Cache directory

The cache directory is used for data that is persisted and shared between different invocations of a program. The actual caches are created in subdirectories. The content of this directory can safely be deleted to clean all caches. This directory must be writable by the application. Otherwise, caches cannot be created or updated leading to significantly decreased performance.

If the user has a profile:

%LOCAL_APPDATA%\PDF Tools AG\Caches

If the user has no profile:

<TempDirectory>\PDF Tools AG\Caches