Hi, It's a good idea to add an encrypted hello world example. Though I do not have much time right now, so hope I it is enough, if I send you a smaller example via e-mail.
The first step is to construct a PdfEncrypt object which can either be passed to PdfStreamedDocuments constructor or be set on a PdfDocument using PdfMemDocument::SetEncrypted( const PdfEncrypt & e ). To create a PDF file with an owner and user password and which only allows printing the document you could use the following code with PdfStreamedDocument: PdfStreamedDocument writer ( argv[1], ePdfVersion_1_5, &PdfEncrypt( "user_password", "owner_password", PdfEncrypt::ePdfPermissions_Print ) ); or for PdfMemDocument: PdfMemDocument doc; // ... do something .. doc.SetEncrypted( PdfEncrypt( "user_password", "owner_password", PdfEncrypt::ePdfPermissions_Print ) ); doc.Write("test.pdf" ); By the way, I should note that AES encryption does not work yet. best regards, Dom Am Friday 31 August 2007 schrieben Sie: > Hi, I have been browsing some of the new PDFEncrypt classes on SVN, > but I'm a little confused about how I can use them. Any chance of some > suggested additions to HelloWorld to set a password & encryption method > {MD5, RC4, AES} on the output doc? > > Thanks, Ian -- ********************************************************************** Dominik Seichter - [EMAIL PROTECTED] KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo - http://podofo.sf.net - PDF generation and parsing library SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE Alan - http://alan.sf.net - A Turing Machine in Java **********************************************************************
pgpQrNzWwuKW6.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users