DynaPDF Manual - Page 331

Previous Page 330   Index   Next Page 332

Function Reference
Page 331 of 860
Return values:
If the function succeeds the return value is the viewport handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
CreateXFAStream
Syntax:
SI32 pdfCreateXFAStream(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Stream name, e.g. config, xdp:xdp, and so on
const void* Buffer, // XFA buffer
UI32 BufSize)
// Buffer size in bytes
The function creates an XFA stream and adds it to the global XFA resource array. The parameter
Name must be the name of the XFA resource. Buffer must be a valid XFA stream buffer or NULL, if
the buffer should be set later with SetXFAStream().
Remarks:
This function is implemented in an Ansi and Unicode compatible variant.
Return values:
If the function succeeds the return value is the stream handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
DecryptPDF
Syntax:
SI32 pdfDecryptPDF(
const PPDF* IPDF,
// Instance pointer
const char* FileName, // PDF file to be decrypted
TPwdType PwdType,
// Password type used to decrypt the file
const char* Password) // Password
This function decrypts a PDF file by using the supplied password and password type. If the file is
not encrypted the parameter password is ignored. The file is recompressed during import; this
reduces the file size in most cases.
By using specific import flags (see SetImportFlags()), it is also possible to remove unwanted objects
from the PDF file, such as annotations, form fields, bookmarks and so on.
If the input file contains a compressed object structure, it will be converted back to a normal PDF
file.
The input PDF file will be replaced with the new one if no error occurred during import. If an error
occurred the file is left unchanged.
 

Previous topic: CreateURIAction, CreateViewport

Next topic: DeleteAcroForm