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

DynaPDF Manual - Page 282

Previous Page 281   Index   Next Page 283

Function Reference
Page 282 of 750
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: DecryptPDF

Next topic: DeleteActionFromObjEx