Then demo.pdf.SetProtection ( [canPrint], 'sdfqsdfqs', 'whatever') finally does not protect at all the document.
Well, would be nice if it could work ! Anyway thanks for this FPDF library which can be used for simple things (btw I had used the PHP original long time ago, and had replaced it by TCPDF.
Kind regards,
Olivier de SAint Leger
Just installed the library on Delphi Alexandria CE through GetIt (as I need a replacement for an old QuickPDF licence which cannot be installed in parallel to an existing DXE3 version). Playing with the console demo, I added the directive {$DEFINE HAS_PROTECTION} as I saw it enables some protection features. There are 2 issues: 1 -the md5 routine (called in function TFPDFExt._md5_16(AStr: AnsiString): AnsiString;) does not exist. I then added one I had found long ago (MD5 Message-Digest for Delphi 4, Implementation of Ronald L. Rivest's RFC 1321, Copyright © 1997-1999 Medienagentur Fichtner & Meyer, Written by Matthias Fichtner. So it compiles fine, but: 2 - the field Self.Padding remains empty and the routine TFPDFExt._generateencryptionkey(const UserPass: AnsiString; const OwnerPass: AnsiString; protection: Integer) does not generate anything (_UValue returns empty)
Then demo.pdf.SetProtection ( [canPrint], 'sdfqsdfqs', 'whatever') finally does not protect at all the document.
Well, would be nice if it could work ! Anyway thanks for this FPDF library which can be used for simple things (btw I had used the PHP original long time ago, and had replaced it by TCPDF. Kind regards, Olivier de SAint Leger