Home » Developer & Programmer » Reports & Discoverer » Generate PDF with Password (Reports 6i)
Generate PDF with Password [message #518289] Tue, 02 August 2011 22:35 Go to next message
sethumurugan
Messages: 61
Registered: June 2010
Location: Chennai
Member
Hi,

We are going to provide a form where emmployees can see and download their payslips in PDF format.

I would like to have that PDF password protected for both access and edit the PDF.

We are using Reports 6i.

Thank you and regards,
S. Sethu Murugan
Re: Generate PDF with Password [message #518314 is a reply to message #518289] Wed, 03 August 2011 02:00 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I might be wrong, but here's how I see it: first, create a PDF file. Then password protect it.

Easy to say, but - how to do that? There are utilities that are capable of setting (as well as cracking) PDF files' passwords, but you most probably need to do that at the operating system command prompt level. I googled a little bit, but couldn't find anything suitable. There is, for example, this Applying PDF Password Security Using Acrobat JavaScript document, but I have no idea how to do that in a simple manner.

Therefore, I got another idea - easier for me as I know how to implement it. You didn't, though, specify operating system you use, so I'll speak for MS Windows. There's the 7-zip (free) archiver which is capable of compressing files and - what we need - password protect archives. It does that with the "-p" switch:
7za a payslip.7z payslip.pdf -pSECRET
which says: (7-)zip the payslip.pdf file, store it into the payslip.7z archive and password protect the archive with the SECRET password. More examples here.

So you'd run the form, create a report, use HOST to call the batch script that would zip the PDF.

Hopefully, someone will know a better approach.
Re: Generate PDF with Password [message #518436 is a reply to message #518289] Wed, 03 August 2011 22:52 Go to previous messageGo to next message
sethumurugan
Messages: 61
Registered: June 2010
Location: Chennai
Member

That is gr8. thank you for your suggestion.

In the sample you have mentioned, am supposed to use another tool which i do not know whether it is allowed in my application server or not. And also it will give you an .ZIP.

Instead I would like to get a PDF directly with password protected. Now a days, all of my bank statement, mobile bill which I used to get in my emil is password protected. he passwords is combination of some of my personal information like firts 3 letters of my name, last five digits of my mobile no etc.

So am sure there should be a way for this, but do not know how.

Thank you.
Re: Generate PDF with Password [message #518445 is a reply to message #518436] Wed, 03 August 2011 23:57 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Of course there is a way; I don't know how to password protect a PDF document in a way that you could use it from a form.
Previous Topic: Workbooks in Discoverer
Next Topic: Fit content of text
Goto Forum:
  


Current Time: Tue Apr 16 16:42:38 CDT 2024