Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 288

Previous Page 287   Index   Next Page 289

Function Reference
Page 288 of 770
Return values:
If the function succeeds the return value is 0. If the function fails the return value is a negative error
code. The returned error code can be used to determine whether a wrong password was supplied to
the function. This can be done with the macro PDF_WRONG_PWD(). This macro returns true if the
password was wrong. In Delphi, the C macro is defined as a normal function.
Example (C++):
#include "dynapdf.h"
using namespace DynaPDF;
// First we declare an error callback function.
SI32 PDF_CALL PDFError(const void* Data, SI32 ErrCode, const char*
ErrMessage, SI32 ErrType)
{
printf("%s\n", ErrMessage);
return 0;
}
int main(int argc, char* argv[])
{
pdfSetOnErrorProc(NULL, PDFError);
// The document info entries are changed by the function if set
pdfSetDocInfo(diSubject, "Decrypt PDF files");
pdfSetDocInfo(diCreator, "C++ example test project");
pdfSetDocInfo(diTitle, "Changed title");
pdfDecryptPDF("c:/test.pdf", ptOpen, NULL);
return 0;
}
DeleteAcroForm
Syntax:
void pdfDeleteAcroForm(
const PPDF* IPDF) // Instance pointer
The function deletes a maybe existing Interactive Form. If the document contains no interactive form
the function does nothing.
 

Previous topic: CreateURIAction, DecryptPDF

Next topic: DeleteActionFromObj, DeleteActionFromObjEx