Password Protect PDF Files

  • en3r0
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0

en3r0 created the topic: Password Protect PDF Files

Is there a way to password protect (encrypt) PDF files after they are rendered? It would be ideal and safer to send it that way.

If there is no solution already, can someone point me in the right direction to do this myself?
#91569
  • Posts: 4667
  • Karma: 72
  • Thank you received: 411

lennerd replied the topic: Re: Password Protect PDF Files

Hello,

I am not aware of a working solution. But Breezingforms uses the tcpdf library to generate pdf files. Maybe you should have a look at their documentation how to do that and add the needed code to Breezingforms.

The pdf creation is located in /components/com_breezingforms/facileforms.process.php around line 4447

Regards,
Stefan

===============================================
Satisfied? Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#91801
  • Posts: 6
  • Thank you received: 0

icedman21 replied the topic: Re: Password Protect PDF Files

Hi.

I changed this section in the exppdf function of /components/com_breezingforms/facileforms.process.php file.
require_once(JPATH_SITE . '/administrator/components/com_breezingforms/libraries/tcpdf/tcpdf.php');
$pdf = new TCPDF();
$pdf->setPrintHeader(false);
$pdf->AddPage();

to this
require_once(JPATH_SITE . '/administrator/components/com_breezingforms/libraries/tcpdf/tcpdf.php');
$pdf = new TCPDF();
$pdf->setPrintHeader(false);
//I added this line to add password protection for the PDF file
$pdf->SetProtection(array('print','annot-forms'), 'somepassword', null, 0, null);
 $pdf->AddPage();

This works for me, creating a password protected form that only allows printing and modifying, but not copying text to clipboard.

However, having to manually edit the code to change the password is a bit difficult, especially for non programmers.

How do I add a PDF password option to any form that i create. It can be in the advanced settings tab of the form properties or in the Form Properties - Advanced Options - More Options - Admin Emails Tab - Email Notification, after the Attachment type dropdown box. I am willing to share the code after I finish it.
#146760
  • Jambra
  • Visitor
  • Visitor

Jambra replied the topic: Password Protect PDF Files

If you're using the pro version of Adobe Acrobat, you can do that manually. I mean you can password protect PDF files with ease. There's a feature in Adobe Acrobat Pro that helps you apply password protection as well as other security parameters.

You can read this article for complete information - wordpress.semnaitik.com/2015/07/21/passw...rotect-pdf-manually/

But if you don't have the pro version of Adobe Acrobat, you can try one thing. You can create an archive file (ZIP or RAR) by using the WinRAR tool, and store all the PDF files into it. After that, you can apply password on the archive file.

Thanks.
#211451
  • Posts: 5
  • Thank you received: 0

Tirthankar replied the topic: Password Protect PDF Files

Thankyou guys for all the the answers you provided.
Hope something works out
#223681
Moderators: tomeperica
Time to create page: 0.045 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here