PDF password protected [message #248495] |
Tue, 17 July 2007 15:37  |
Eclipse User |
|
|
|
Hi,
I have the following question: is there any possibility to assign a
password to a report such as if the user wants to modify the generated PDF
in Acrobat Reader, not to be allowed (only if they know that password)?
Thank you,
Cristian
|
|
|
|
|
|
|
|
Re: PDF password protected [message #251409 is a reply to message #251394] |
Tue, 07 August 2007 03:04   |
Eclipse User |
|
|
|
But wouldn't it make sense to log a bug against Birt to allow this out
of the box, by setting some configuration variable?
Tom
Jochen Frühwirth schrieb:
> I agree, use iText.
>
> example code, encrypting with an ownerpassword:
>
> final PdfReader reader = new PdfReader(fileName);
> final File destinationFile = File.createTempFile("report_encrypted_",
> ".pdf");
>
> PdfEncryptor.encrypt(reader,
> new FileOutputStream(destinationFile),
> null,
> password.getBytes(),
> PdfWriter.AllowPrinting,
> false);
>
> final File sourceFile = new File(fileName);
> sourceFile.delete();
> destinationFile.renameTo(sourceFile);
>
>
> Cristian schrieb:
>> I didn't find anything anywhere about PDF protection in BIRT. My
>> solution would be to use iText tools to protect the generated report
>> with a password or smth.
>>
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04374 seconds