Hallo Robert,
require_once ('include/fpdf/fpdf.php');
require_once ('include/fpdi/fpdi.php');
require_once ('include/fpdi/FPDI_Protection.php');
$pdf = new personalizedPDF ( );
if ($pdf->setPDFSource ( $path )) {
/* Die Signatur von SetProtection lautet:
*
* void SetProtection (
* [array $permissions=array()
* [, string $user_pass=''[, string $owner_pass='']]] )
*
* SetProtection liefert nichts zurück. Nicht False, nicht irgendetwas anderes.
*/
// Daher kannst Du den Erfolg nicht so prüfen.
if (! $pdf->SetProtection ( array ('print' ), "passwort" )) {
$message .= "Es ist ein unbekannter Fehler ausgetreten!";
}
Freundliche Grüße
Vinzenz