# Encrypt or password protect PDF document created with Ruport

**URL:** <https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381>\
**Category:** Rails\
**Created:** [May 22, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381 "2008-05-22T14:16:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhushangahire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bcef8e/32.png) [@bhushangahire](https://www.ruby-forum.com/u/bhushangahire)\
**Post date:** [May 22, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381/1 "2008-05-22T14:16:25Z")

</div>

I am using Ruport and Rupdf to create PDF document,  
I want to encrypt the PDF document with some password.

I have gone through the PDF::Write#encrypt method, But I am not able to  
use it with Ruport.

If anyone already done this or have any idea how to do it with ruport  
please reply.

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![bhushangahire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bcef8e/32.png) [@bhushangahire](https://www.ruby-forum.com/u/bhushangahire)\
**Post date:** [May 27, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381/2 "2008-05-27T23:29:37Z")

</div>

On May 22, 8:16 am, Bhushan A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I am usingRuportand Rupdf to create PDF document,  
> I want to encrypt the PDF document with some password.
> 
> I have gone through the PDF::Write#encrypt method, But I am not able to  
> use it withRuport.
> 
> If anyone already done this or have any idea how to do it withruport  
> please reply.

PDF::Writer’s encryption code was broken so we removed it from 1.1.4

Ruport depends on the later versions of PDF::Writer, so basically, we  
need someone to submit a patch to fix the encryption to fix your  
problem :-/

---

<div class="post-metadata">

**Author:** ![bhushangahire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bcef8e/32.png) [@bhushangahire](https://www.ruby-forum.com/u/bhushangahire)\
**Post date:** [May 28, 2008, 12:49am UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381/3 "2008-05-28T00:49:27Z")

</div>

I know very well how PDF format works. Where i need look to write a  
patch?

Regards,  
Luiz Vitor Martinez C.

On 5/27/08, Gregory B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > If anyone already done this or have any idea how to do it withruport  
> > please reply.
> 
> PDF::Writer’s encryption code was broken so we removed it from 1.1.4
> 
> Ruport depends on the later versions of PDF::Writer, so basically, we  
> need someone to submit a patch to fix the encryption to fix your  
> problem :-/
> 
> >

–  
Regards,

Luiz Vitor Martinez C.  
cel.: (11) 8187-8662  
blog: [rubz.org](http://rubz.org)  
engineer student at maua.br

---

<div class="post-metadata">

**Author:** ![bhushangahire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bcef8e/32.png) [@bhushangahire](https://www.ruby-forum.com/u/bhushangahire)\
**Post date:** [May 28, 2008, 6:55am UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381/4 "2008-05-28T06:55:41Z")

</div>

Hi Luiz,

Thanks for taking this into consideration…  
I am also facing problem with watermark in PDF  
I am successfully put watermark in the PDF its rendering as watermark on  
all pages but still the text coming backside of the watermark image.  
I am able to select the text at the back of the image, so image is with  
watermark property.

So if you or anyone gone through this issue please let me know…

Thanks  
Bhushan A.  
Blog: [blog.bhushangahire.net](http://blog.bhushangahire.net)

Luiz Vitor Martinez C. wrote:

> I know very well how PDF format works. Where i need look to write a  
> patch?
> 
> Regards,  
> Luiz Vitor Martinez C.
> 
> On 5/27/08, Gregory B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > If anyone already done this or have any idea how to do it withruport  
> > > please reply.
> > 
> > PDF::Writer’s encryption code was broken so we removed it from 1.1.4
> > 
> > Ruport depends on the later versions of PDF::Writer, so basically, we  
> > need someone to submit a patch to fix the encryption to fix your  
> > problem :-/
> > 
> > >
> 
> –  
> Regards,
> 
> Luiz Vitor Martinez C.  
> cel.: (11) 8187-8662  
> blog: [rubz.org](http://rubz.org)  
> engineer student at maua.br

---

<div class="post-metadata">

**Author:** ![bhushangahire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bcef8e/32.png) [@bhushangahire](https://www.ruby-forum.com/u/bhushangahire)\
**Post date:** [May 28, 2008, 2:29pm UTC](https://www.ruby-forum.com/t/encrypt-or-password-protect-pdf-document-created-with-ruport/138381/5 "2008-05-28T14:29:27Z")

</div>

Luiz,  
Since you have a good understanding of preparing a .pdf output, would  
you happen to know anyone who can include a code39 barcode in  
these .pdf Ruport reports?  
The Ruport guys ignore my emails on this subject and I cannot proceed  
with there product until I find a strategy for this. I’d be happy to  
pay you or anyone else that might be able to ‘pull this off’.  
Gracias,  
Kathleen

On May 27, 4:48 pm, “Luiz Vitor Martinez C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
