DynaPDF Manual - Page 660

Previous Page 659   Index   Next Page 661

Function Reference
Page 660 of 787
SetContent
Syntax:
LBOOL pdfSetContent(
const PPDF* IPDF,
// Instance pointer
const char* Buffer, // New content stream
UI32 BufSize)
// Buffer size in bytes
This function replaces the content stream of the currently open page or template with a new one. If
the parameter Buffer is NULL the content stream of the page or template will be deleted. In the latter
case page resources such as fonts, images and so on will be deleted from the page object too.
Remarks:
Use this function in combination with GetContent() if you need to change a content stream in a
manner that DynaPDF does not supports. Do never change a content stream when you don't know
exactly what you are doing.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetDateTimeFormat
Syntax:
LBOOL pdfSetDateTimeFormat(
const PPDF* IPDF, // Instance pointer
UI32 TxtField,
// Text field handle
TPDFDateTime Fmt) // Date or time format
typedef enum
{
dfMM_D
= 0,
dfM_D_YY
= 1,
dfMM_DD_YY
= 2,
dfMM_YY
= 3,
dfD_MMM
= 4,
dfD_MMM_YY
= 5,
dfDD_MMM_YY
= 6,
dfYY_MM_DD
= 7,
dfMMM_YY
= 8,
dfMMMM_YY
= 9,
dfMMM_D_YYYY
= 10,
dfMMMM_D_YYYY
= 11,
dfM_D_YY_H_MM_TT
= 12,
dfM_D_YY_HH_MM
= 13,
/* time formats */
df24HR_MM
= 14,
df12HR_MM
= 15,
df24HR_MM_SS
= 16,
df12HR_MM_SS
= 17
}TPDFDateTime;
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.
 

Previous topic: SetCompressionFilter, SetCompressionLevel

Next topic: SetDefBitsPerPixel, SetDocInfo

Start Chat