Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 622

Previous Page 621   Index   Next Page 623

Function Reference
Page 622 of 750
To improve processing speed the directory in which CMap files are stored should not contain
other file types.
CMap files should be loaded once per PDF instance and one PDF instance should be used as
long as possible to create an arbitrary number of PDF files.
The CMap name and the file name should be identical.
A valid CMap file must begin with the DSC comment "%!PS-Adobe-3.0 Resource-CMap"
(excluding double quotes). Other DSC comments are optional.
The keys /CMapType, /WMode, /CMapName and /CIDSystemInfo must be fully defined
within the first 4096 bytes.
DynaPDF uses the value of /CMapName and the CIDSystemInfo dictionary to identify a
CMap file.
The parameter Path must be an absolute path if the CMaps are loaded delayed. Otherwise it is maybe
not possible to load the files, e.g. if the current directory was already changed at the time the files
must be loaded.
The function performs a duplicate check during execution. If two CMap files with the same name,
registry, and ordering will be found, the one with the higher supplement number will be added to
the cache. The function parses the CMap's header information only. A CMap file must be loaded into
memory with LoadCMap() before it can be used with SetCIDFont(). However, the CMap's header
information can be accessed with GetCMap() without loading the CMap file.
The function is implemented in an Ansi and Unicode compatible version. Unicode paths are
converted to UTF-8 on non-Windows operating systems.
Return values:
If the function succeeds the return value is the number of CMap files in the cache. This value can
directly be used to access the CMap headers with GetCMap(). If the function fails the return value is
a negative error code. The only reason why this function can fail is out of memory.
LBOOL pdfSetColDefFile(
const PPDF* IPDF, // Instance pointer
UI32 EmbFile)
// Handle of an embedded file
The function sets the initial document of a portable collection that should be opened in the viewer
application. See also CreateCollection().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: SetCMapDir

Next topic: SetColors