thank you very much Giuseppe for helping me in solving this problem, actually i was very frustrated bcz every thing seems ok to me but have no effect on the resultant pdf... but now got the point ...
Thanx, Saqlain Abbas Giuseppe Castagno-3 wrote: > > Saqlain Abbas wrote: >> 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; > > mm, I think this isn't the right approach to set the PDF export filter > properties. > > I don't have a Java code chunk on the matter, but a few months back I > wrote a small extension in Basic that can be examined to see how the > filter parameter should be managed; from that I think you can make out > how to do it in Java. > > You can download it from here [1], where it still lurks. > > I'm afraid the comment are in Italian, but feel free to ask on the list > if you have any question. > > In the extension, the function that starts all is: > > Main_EsportaPDF > > This is a code example, so it's not very clean, anyway the sequence in > Basic is the following: > > 1) from the kind of document at hand, determine the pdf export filter > name; > > 2) prepare the set of PDF filter properties (e.g. > UseLosslessCompression, Magnification , etc...) in a properties array; > > 3) prepare a new array of properties with three properties (only the > first two matters, the second is optional): > with name 'FilterName' value set to the name retrieved in 1) > with name 'FilterData' value set the the properties array prepared in 2) > with name 'StatusIndicator' the status indicator for user (I think this > is meaningless in your case); > > 4) use this second property array as second parameter in calling > storeToURL(). > > Hope that helped. > > -- > Kind Regards, > Giuseppe Castagno > Acca Esse http://www.acca-esse.eu > [EMAIL PROTECTED] > [1] > http://www.acca-esse.it/dwnld/ooohs/macro/ooo-hs-esporta-pdf-public-0.1.oxt > >> 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. >>> > > > > > --------------------------------------------------------------------- > 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#a13482286 Sent from the openoffice - dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
