<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Encrypt a pdf file (Delphi)</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : General Discussion : Encrypt a pdf file (Delphi)]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 07:08:39 +0000</pubDate>
  <lastBuildDate>Wed, 06 Dec 2017 08:25:45 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=3528</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Encrypt a pdf file (Delphi) : Hi,Thanks for your help. It works...]]></title>
   <link>http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14043.html#14043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2991">Amelie</a><br /><strong>Subject:</strong> 3528<br /><strong>Posted:</strong> 06 Dec 17 at 8:25AM<br /><br />Hi,<div><br><div><div><div>Thanks for your help. It works well !</div><div>&nbsp;I use version 11.13.</div><div><br></div><div>@&nbsp;<span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px; : rgb251, 251, 253;">tfrost</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px; : rgb251, 251, 253;">&nbsp;:&nbsp;</span><font face="Arial, Helvetica, sans-serif"><span style="font-size: 15px; line-height: 21px;">thanks for your advices</span></font></div><div><span style="line-height: 1.4;"><br></span></div><div>Have a good day</div></div></div></div><div><br></div><div>Amélie</div>]]>
   </description>
   <pubDate>Wed, 06 Dec 2017 08:25:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14043.html#14043</guid>
  </item> 
  <item>
   <title><![CDATA[Encrypt a pdf file (Delphi) : Please check again the documentation...]]></title>
   <link>http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14042.html#14042</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1388">tfrost</a><br /><strong>Subject:</strong> 3528<br /><strong>Posted:</strong> 05 Dec 17 at 9:32PM<br /><br />Please check again the documentation for Encrypt.&nbsp; The parameters for Delphi should be Owner, User, Strength, Permissions.&nbsp; The filename should not be there, and the final '1' should be replaced by a value returned from an earlier call to EncodePermissions.<div><br></div><div>Then, check the result code from Encrypt before you save the file.&nbsp; If you get a 0, call LastErrorCode to get more information.&nbsp; Alternatively, if all you want to do is encrypt the file, you can use EncryptFile.</div><div><br></div><div>I am sure that users here will be happy to help you if we have a bit more detail (including the library version you are using)!</div>]]>
   </description>
   <pubDate>Tue, 05 Dec 2017 21:32:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14042.html#14042</guid>
  </item> 
  <item>
   <title><![CDATA[Encrypt a pdf file (Delphi) : Hi Amelie,here you can read about...]]></title>
   <link>http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14041.html#14041</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 3528<br /><strong>Posted:</strong> 05 Dec 17 at 9:31PM<br /><br />Hi Amelie,<br><br>here you can read about the encrypt-function (only four parameters are available):<br>http://www.debenu.com/docs/pdf_library_reference/Encrypt.php<br>And here you can read about how to generate the fourth parameter:<br>http://www.debenu.com/docs/pdf_library_reference/EncodePermissions.php<br>Sample for Encrypt and EncodePermission:<br>// . . .<br>var <br>p5, p6, p7, p8, p9, p10, p11, p12, perm : LongInt;<br>perm := ViewPrintQP.EncodePermissions(p6, p7, p8, p10, p9, p11, p12, 0);<br>ViewPrintQP.Encrypt('Owner' , 'User' , 1 , perm);<br>// . . .<br>There's no need to insert dlgOpen.FileName into the encrypt-function 'cause the file is already known with the LoadFromFile.<br><br>To make it clean you should check first, if the file is already encrypted and do a decrypt.<br>This you can do after LoadFromFile.<br>Here's a sample:<br>// . . .<br>If ( ViewPrintQP.EncryptionStatus &gt; 0 ) Then<br>&nbsp;&nbsp;&nbsp;&nbsp; ViewPrintQP.Decrypt;<br>// . . .<br><br>Wish you more luck with the next try ;-)<br><br>]]>
   </description>
   <pubDate>Tue, 05 Dec 2017 21:31:13 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14041.html#14041</guid>
  </item> 
  <item>
   <title><![CDATA[Encrypt a pdf file (Delphi) : Hello!how to encrypt a pdf file...]]></title>
   <link>http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14040.html#14040</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2991">Amelie</a><br /><strong>Subject:</strong> 3528<br /><strong>Posted:</strong> 05 Dec 17 at 5:39PM<br /><br />Hello!<div><br></div><div><div>how to encrypt a pdf file (Delphi) please with "Quick PDF Library" ?</div><div>I tried the following code, but it does not encrypt the file:</div></div><div><br></div><div><div><b><i>var</i></b></div><div><b><i>&nbsp; CanProceed: Boolean;</i></b></div><div><b><i>begin</i></b></div><div><b><i><br></i></b></div><div><b><i>CanProceed := False;</i></b></div><div><b><i>&nbsp; if dlgOpen.Execute then</i></b></div><div><b><i>&nbsp; begin</i></b></div><div><b><i>&nbsp; &nbsp; ViewPrintQP := TDebenuPDFLibrary.Create;</i></b></div><div><b><i>&nbsp; &nbsp; if ViewPrintQP.UnlockKey(edtLicenseKey.Text) = 1 then</i></b></div><div><b><i>&nbsp; &nbsp; begin</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; if ViewPrintQP.LoadFromFile(dlgOpen.FileName, '') = 1 then</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; begin</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; &nbsp; CanProceed := True;</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; end else</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; &nbsp; MessageDlg('The PDF could not be opened.', mtError, &#091;mbOK&#093;, 0);</i></b></div><div><b><i>&nbsp; &nbsp; end else</i></b></div><div><b><i>&nbsp; &nbsp; &nbsp; MessageDlg('The license key is invalid or has expired.', mtError, &#091;mbOK&#093;, 0);</i></b></div><div><b><i>&nbsp; end;</i></b></div><div><br></div><div><b><i>ViewPrintQP.Encrypt(dlgOpen.FileName , '' , 'Owner' , 'User' , 1 , 1);</i></b></div><div><b><i><br></i></b></div><div><b><i>ViewPrintQP.SaveToFile('E:\encrypted_doc.pdf');</i></b></div></div><div><br></div><div><br></div><div>it saves the file but it is not encrypted and it is not protected by password.</div><div><br></div><div>how to solve this problem please?</div><div><br></div><div>Thank you.</div><div><br></div><div>Best regards.</div><div>Amelie</div><span style="font-size:10px"><br /><br />Edited by Amelie - 05 Dec 17 at 5:46PM</span>]]>
   </description>
   <pubDate>Tue, 05 Dec 2017 17:39:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/encrypt-a-pdf-file-delphi_topic3528_post14040.html#14040</guid>
  </item> 
 </channel>
</rss>