DynaPDF Manual - Page 348

Previous Page 347   Index   Next Page 349

Function Reference
Page 348 of 839
The function SetSpaceWidthFactor() can be used to adjust the space width factor that is used to
identify emulated space characters. This can be useful if too many or too few spaces occur in
extracted text.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
FileAttachAnnot
Syntax:
SI32 pdfFileAttachAnnot(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate for the annotation icon
double PosY,
// Y-Coordinate for the annotation icon
TFileAttachIcon Icon, // Annotation icon
const char* Author,
// Optional author
const char* Desc,
// Optional description
const char* AFile,
// File to be embedded (required)
LBOOL Compress)
// If true, the embedded file will be compressed
typedef enum
{
faiGraph,
faiPaperClip,
faiPushPin,
faiTag
}TFileAttachIcon;
The function inserts a file attachment annotation on the current open page. If the coordinate system
is bottom-up the point PosX, PosY defines the lower left point of the annotation icon. If the
coordinate system is top-down it defines the upper left point. The width and height of the icon is not
changeable.
The embedded file is compressed if the parameter Compress is set to true. Otherwise it is left
uncompressed. It is not always useful to compress embedded files especially if the file is already
compressed, e.g. Zip files or already compressed image formats require no further compression. In
the worst case the compressed files becomes larger. However, text files and most document formats
should be compressed to reduce the file size.
File attachment annotations are supported since PDF 1.3 (Acrobat 4). File attachments are supported
since PDF 1.4 (Acrobat 5). The difference between both attachment types is that a file attachment
annotation is used as a comment that has usually a visible icon on a page, e.g. to provide additional
information about a specific object.
File attachments are used to add arbitrary files to the PDF file, e.g. job options, the original
document from which the file was created, or any other file (see also AttachFile()).
 

Previous topic: ExchangePages, ExtractText

Next topic: FileAttachAnnotEx