pdfLoadFileWithPassword
Load a PDF file from disk, with a password.
int pdfLoadFileWithPassword(PDFHandle *pdfPtr, const char *pdfFileName,
const char *password)
This function opens a PDF file,
pdfFileName
, from disk,
applying the specified password, and constructs a PDF handle
as *pdfPtr
. This function must be called before any of
the functions that access a PDF file.
The pdfLoadFileWithPassword
function returns
pdfOk
if successful, otherwise an
error code.
IMPORTANT: The PDF file on disk must not be deleted or modified
until after pdfFree
is called.
C:
PDFHandle pdf;
int err;
err = pdfLoadFileWithPassword(&pdf, "c:/test/file.pdf", "secret");
if (err != pdfOk) {
/* handle the error */
...
}