Hi All,
thanx Giuseppe for your response , i have written the following code (to set
the security restriction), but its not working ... so what the problem in
it, or there is another way to do it ...
// Set properties for conversions
PropertyValue[] conversionProperties = new PropertyValue[7];
conversionProperties[0] = new PropertyValue();
conversionProperties[0].Name = "Overwrite";
conversionProperties[0].Value = new Boolean(true);
conversionProperties[1] = new PropertyValue();
conversionProperties[1].Name = "FilterName";
conversionProperties[1].Value = conversionFilter;
conversionProperties[2] = new PropertyValue();
conversionProperties[2].Name = "RestrictPermissions";
conversionProperties[2].Value = new Boolean(true);
conversionProperties[3] = new PropertyValue();
conversionProperties[3].Name = "EncryptFile";
conversionProperties[3].Value = new Boolean(true);
conversionProperties[4] = new PropertyValue();
conversionProperties[4].Name = "DocumentOpenPassword";
conversionProperties[4].Value = "open";
conversionProperties[5] = new PropertyValue();
conversionProperties[5].Name = "Printing";
conversionProperties[5].Value = new Integer (0);
conversionProperties[6] = new PropertyValue();
conversionProperties[6].Name = "EnableCopyingOfContent";
conversionProperties[6].Value = new Boolean (false);
// Convert
try {
// See ../Office/Office.CreateUNOCompatibleURL.snip for
method
createUNOFileURL(targetFilename);
xStorable.storeToURL(createUNOFileURL(targetFilename),
conversionProperties);
} catch (IOException e) {
e.printStackTrace();
}
Regards,
Saqlain Abbas
Giuseppe Castagno-3 wrote:
>
> Saqlain Abbas wrote:
>> Hi All,
>>
>> I have converted a .Doc file into pdf using OO-API. Now i want to apply
>> following security restriction on pdf file generated through OO-API
>> (programmatically in JAVA).
>>
>> 1) The resultant pdf file should be readonly.
>> 2) The resultant pdf file should be password protected.
>> 3) The User should not be able to copy text from resultant pdf file.
>> 4) The User should not be able to print resultant pdf file.
>>
>> Of course for these i have to set different properties, But i dont know
>> the
>> Property Name and value. So i need your help i.e. what properties should
>> i
>> set to apply the above security restriction.
>
> keeping in mind what Hubert pointed out in the other response, you can
> find information on PDF export filter properties on the filter
> specification [1] (have a look to section 3 Configuration), except
> the security related ones, that are only documented in
> issue 67578 [2] (look for "Filter property values for scripting" without
> quotes in the attached document there).
>
> Hope that helped.
>
> --
> Kind Regards,
> Giuseppe Castagno
> Acca Esse http://www.acca-esse.eu
> [EMAIL PROTECTED]
> [1] http://specs.openoffice.org/appwide/pdf_export/PDFExportDialog.odt
> [2] http://qa.openoffice.org/issues/show_bug.cgi?id=67578#desc2
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/how-to-appy-security-restriction-on-pdf-file-generated-from-.doc-using-OO-API-tf4703297.html#a13462625
Sent from the openoffice - dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]