Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to make pdf non editable?

Not applicable
Hi all,

I need help of yours for solving the problem.

My problem is:-

1.I have used the oledb connection for populating data in the editable form. For one Instance that form needs to be editable and for another instance or another time that form need to be read only. I don't know for doing this is possible or not.

2. I have used the oledb connection for connection SQL SERVER database. When I open the pdf file after saving from livecycle it shows the message "Connection failed due to Environment is not trusted".

How to solve this problem??

Any help and suggestions is appreciable.

Thank You
7 Replies
Not applicable

take a look at this post on my blog

if you have further questions let me know

girish bedekar
Not applicable
I made a editable pdf and put it online for people to fill out the form and email me back in pdf format, but when I get the email it still allows me to edit the pdf, I just want to be able to get the pdf back save it and print it without accidently messing it up, is there a way around this?
Level 10
Level 10
You could change each field on the form to readOnly when they hit the mail button (programmatically of course)....if you post your email address I will send you a sample on how to do.
Not applicable
Thanks Paul,
Level 10
Level 10
Here is a function that will lock all fields on the form for you. Simply put it in a scripting object and call it (passing in the root node of your form and it will lock everything).

If you create a script object called myScriptObject then calling this woudl be like this:



Function: LockAllFields

Description: This function will lock all fields.

IN: The parent subform. It could also be an element that contains subform like form1

OUT : nothing


function LockAllFields(myParentObject){

var allChildElements;

var intNumElements;

var currentElement;

var j;

//Get all the child nodes of the parent element

allChildElements = myParentObject.nodes;

//Total number of element in the object

intNumElements = allChildElements.length;

//Loop through all the child elements

for(j=0; j< intNumElements;j++){

currentElement = allChildElements.item(j);

//If the element is another subform we'll recusively call the function again

if(allChildElements.item(j).className == "subform"){



//If the objects are fields and they are set to mandatory (validate.nullTest) then we will set the border.fill.color - dependant on object type

else if(currentElement.className == "field"){

currentElement.access = "readOnly";


//Check for exclusion groups - Radio Buttons

else if(currentElement.className == "exclGroup"){

for(k=0; k< currentElement.nodes.length;k++){

if(currentElement.nodes.item(k).className == "field"){

//set the access for the radio buttons individually

currentElement.access = "readOnly";





}//end function
Not applicable

I created a script object for a form that I want to lock using the script you showed above; however, I don't know anything about Javascript, so I doubt I did it correctly. If I email you the form, could you open it in LiveCycle and let me know if I did it right?

Basically, I'd like the form to be uneditable once we receive it through email.

I appreciate any help. Thanks!
Level 10
Level 10
I will look at it when I get a chance .....send it to Also include a description of the problem.