Highlighted

How to make pdf non editable?

Avatar

11-08-2008

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

Replies

Highlighted

Avatar

13-08-2008

hi

take a look at this post on my blog

http://eslifeline.wordpress.com/2008/05/15/disabling-all-fields-when-submitting-pdf-by-email/

if you have further questions let me know

girish bedekar

mergeandfuse@gmail.com
Highlighted

Avatar

04-09-2008

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?
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

04-09-2008

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.
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

08-09-2008

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:



myScriptObject.LockAllFields(form1);



/*************************************************************************************

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"){

LockAllFields(currentElement);

}

//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
Highlighted

Avatar

20-10-2008

Paul,



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!
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

20-10-2008

I will look at it when I get a chance .....send it to livecycle8@gmail.com. Also include a description of the problem.