Good Afternoon,
I have created a fillable form in PDF that contains Java Script. If the users have Adobe Reader they are able to fill out the form as inteneded on a PC and Mac. The issue appears to be on Mac you can open forms without Adobe Reader and this appears to cut off words in middle of the page.
1. Any ideas what might be casuing this in Preview and how to fix it?
2. Is there anyway to force it to open in Adobe Reader?
Below is an example of the issue. The radio buttons use to have information beside them and the sentence above has been cut off. (Note: The redaction to protect private information).
Thanks in advance for your help,
Christy
Message was edited by: resnickstark
Preview has many problems with forms.
Plan Ahead. It appears the viewer could be using an A4 paper size instead of an 8-1/2 x 11 viewing area or the PDF was created form an 8-1/2 x 11 size paper onto an A4 paper size.
Wait until you get a form back from someone who has used "Preview", you will be back here again.
You can use JavaScript to and a visible read only form field to inform users that JavaScript needed that it appears not to be available
You can use JavaScript to test for known version of Acrobat/Reader and have a pop up warning about the need to use a compatible PDF viewer.
Hi GKaiseril,
Thanks for your help.
I have a couple of questions:
1. I think the people were using Preview. Will your suggestion of creating a read only field with a Java Script code work with Preview?
If so where could you tell me the code or where I could find it?
If not do you have any ideas on how I could stop them from using Preview?
Thanks again for your help,
Christy
I would add a field that is read only, visible, and has an optional value like "This form requires JavaScript and a PDF Viewer that can proess form fields.".
I then add a document level scripts:
// field name to unlock or lock
var aFieldsReadWrite = new Array ("Text1", "Text2", "Text3");
function setReadWrite(aFields) {
// make locked field read write
for(i = 0; i < aFields.length; i++) {
this.getField(aFields[i]).readonly = false;
}
return true;
}
function setReadOnly(aFields) {
// lock unlocked fields
for(i = 0; i < aFields.length; i++) {
this.getField(aFields[i]).readonly = true;
}
return true;
}
function Init()
{
// check for known viewers and versions
if(app.formsVersion == "undefined" || app.viewerType == "undefined" || app.viewVersion == "undefinded") {
app.alert("This form requires a PDF viewer that appears to be Reader or Acrobat", 0, 0);
} else {
this.getField("JavaScriptWarning").display = display.hidden;
setReadWrite(aFieldsReadWrite);
}
return true;
}
Init();
And a will save script::
this.getField("JavaScriptWarning").display = display.visible;
setReadOnly(aFieldsReadWrite);
I think I must have done something wrong because nothing happened when I opened or saved the PDF form using Preview.
What I did:
1. I created a read only field to use as instructions at the top of the page
2. Next I created a document level script and added the code you wrote starting with //field name to unlock or lock through Init(); above will save script.
3. I then created a Document action will save script using the code you wrote starting with this.getField
I also tried combining the whole thing into one document script.
Any ideas what I might be doing wrong?
Thanks,
Christy
North America
Europe, Middle East and Africa
Asia Pacific