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

DynaPDF Manual - Page 689

Previous Page 688   Index   Next Page 690

Function Reference
Page 689 of 750
nsRed,
nsParensBlack,
nsParensRed
}TNegativeStyle;
The function restricts the allowed input characters of a text field to numbers and formats the
resulting string as specified. A number 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() or
AFDate_Format() / AFDate_FormatEx() to apply a number or date 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.
SetOCGContUsage
Syntax:
LBOOL pdfSetOCGContUsage(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// OCG handle
struct TPDFOCGContUsage* Value) // See below
struct TPDFOCGContUsage
{
UI32
StructSize;
// Must be set to sizeof(TPDFOCGContUsage)
UI32
ExportState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
const char*
InfoCreatorA;
// CreatorInfo -> The application that created the group
const UI16*
InfoCreatorW;
// CreatorInfo -> The application that created the group
const char*
InfoSubtype;
// CreatorInfo -> A name defining the type of content, e.g.
// Artwork, Technical etc.
const char*
LanguageA;
// A language code as described at SetLanguage()
UI16*
LanguageW;
// A language code as described at SetLanguage()
UI32
LangPreferred;
// 0 = Off, 1 = On, PDF_MAX_INT = not set. The preffered state if
// there is a partial but no exact match of the language id.
TOCPageElement PageElement;
// If the group contains a pagination artefact
UI32
PrintState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
const char*
PrintSubtype;
// The type of content that is controlled by the OCG, e.g.
// Trapping, PrintersMarks or Watermark.
UI32
UserNamesCount; // The user names can be accessed with GetOCGUsageUserName()
TOCUserType
UserType;
// The user for whom the OCG is primarily intendet
UI32
ViewState;
// 0 = Off, 1 = On, PDF_MAX_INT = not set
float
ZoomMin;
// Minimum zoom factor at which the OCG should be On. -1 = not set
float
ZoomMax;
// Maximum zoom factor at which the OCG should be On. -1 = not set
};
typedef enum
{
utIndividual,
utOrganization,
utTitle,
utNotSet
}TOCUserType;
 

Previous topic: SetNumberFormat

Next topic: SetOnErrorProc

Web links on this page: