DynaPDF Manual - Page 705
Previous Page 704 Index Next Page 706
Function Reference
Page 705 of 839
The function restricts the allowed value of a text field to a date time format and applies this format if
the value was valid. A date time format is represented as two separate JavaScript actions in PDF
which are automatically created and added to the text field by this function.
The same formats can also be applied manually by creating two JavaScript actions, one for the
OnKeyStroke event, and one for the OnFormat event of the text field. See AddActionToObj() for a
description of the events.
DynaPDF uses the JavaScript functions AFDate_Keystroke() / AFDate_KeystrokeEx() and
AFDate_Format() / AFDate_FormatEx() to apply a date time format. The functions are described in the
JavaScript scripting reference which is available at http://www.adobe.com.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetDefBitsPerPixel
Syntax:
LBOOL pdfSetDefBitsPerPixel(
const PPDF* IPDF, // Instance pointer
SI32 Value)
// Currently supported values are 8 and 24 bit
The function sets the default color depth in bits per pixel, which determines whether images should
be downsampled. If the property is to 8 bits per pixel images are converted to 256 indexed color
images. At time of publication only two values are supported:
•
24 bit: No conversion
•
8 bit: Conversion to 256 indexed color image
Default value = 24
Downsampling will only be applied if Flate compression is used. The color table is always created in
the current color space.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetDocInfo
Syntax:
LBOOL pdfSetDocInfo(
const PPDF* IPDF,
// Instance pointer
TDocumentInfo DInfo, // see below
const char* Value)
// Info string
typedef enum
{
diAuthor
= 0,
diCreator
= 1,
diKeywords
= 2,
diProducer
= 3,
Previous topic: SetContent, SetDateTimeFormat
Next topic: SetDocInfoEx
Web links on this page: