I've created a form in LiveCyle 8.2, but when I open it in Acrobat 9.0, I'm not given the option to set the initial view. How can I set the initial view in LiveCycle? Keep in mind I'm a novice with scripts ... OK with some formcalc.
Thanks.
Hi,
Some controls under Object - Value tab have Default value field, you can put initial data there.
Also you can use Initialize event, smth like that:
this.rawValue="text";
BR,
Paul Butenko
Views
Replies
Total Likes
I think they mean the Initial View setting in Acrobat - how the pdf opens on screen.
Put this in the layout:ready event for your form:
app.setTimeOut("this.zoomType = zoomtype.fitW", 100);
The app.setTimeOut is needed to allow the Acrobat Document Object Model time to be created.
Thanks to Angie Okamoto! Found the above on the Livecycle Developers Google Group.
Settings for zoomtype from the Acrobat JavaScript Scripting Reference:
Zoom Type Keyword Version
NoVary zoomtype.none
FitPage zoomtype.fitP
FitWidth zoomtype.fitW
FitHeight zoomtype.fitH
FitVisibleWidth zoomtype.fitV
Preferred zoomtype.pref
ReflowWidth zoomtype.refW 6.0
Views
Replies
Total Likes
I tried your suggestion but it didn't work for me. This is what I put in:
Under this line: form1::ready:layout - (JavaScript, client)
I put: app.setTimeOut("this.zoomType = zoomtype.fitW"
, 100);
Did I do something wrong?
Views
Replies
Total Likes
That should do the trick...I notice sometimes when launching a preview of a form I'm working on it won't always kick in the first time (not enough of a time out I guess). You could try making the time out a bigger number and see what happens, it's in milliseconds.
Views
Replies
Total Likes
Hi,
there is also another method to control the view of a xfa-form in Acrobat/Reader.
You can manipulate the viewState property through JavaScript at runtime.
Hide all Panes
event.target.viewState = {overViewMode:3};
Fit Height
event.target.viewState = {pageViewZoomType:3};
Show Single Page
event.target.viewState = {pageViewLayoutMode:1};
More details ans an example can be found here:
http://thelivecycle.blogspot.com/2010/04/xfa-form-control-view-settings.html
Has anyone found a way of opening a PDF form full-screen in a browser window (without the save-print-panel on top)?
event.target.viewState = { overViewMode: 4 };
is the closest I get, although that mode changes the behaviour of the mouse cursur (i.e. right- and leftclicking changes the page number).
Views
Replies
Total Likes
Hi C,
I haven't tried this, but it might help if overViewMode:4 is full screen:
app.fs.clickAdvances = false;
Good luck,
Niall
Views
Replies
Total Likes
event.target.viewState = {
overViewMode: 4,
pageViewLayoutMode: 2,
pageViewZoomType: 2,
};
app.fs.clickAdvances = false; // Works like a charm! Thanks Niall!
I found an answer to my problem and it works.
1. Open the form in Acrobat Pro and go the document properties box
2. Choose the security tab and in the security method drop box choose "password security"
3. Once you do that it automatically goes to the "Password Security Setting" dialog box
4. Under permissions, tick the "restrict editing and prinitng of the document...."
5. enter a simple password like "123", dont bother to change anything else
6. Click ok..and you will be asked to enter the password again..enter it.click ok until you return to the document properties page, and hit ok again to exit.
1. Go back to the document properties box
2. next to the security method dropdown menu, click "change settings", that will take you to the password security setting dialog box once more.
3. IMPORTANT : Just click cancel to exit that box.
4. Now you're back at the document properties. in the password security setting drop down menu change it to "no security"
5. Click yes/ok to confirm, and exit the document properties box totally.
Views
Replies
Total Likes
You mean... that's what you have to do to get app.setInterval working?!
Views
Replies
Total Likes
Nice find Radzmar!
Views
Replies
Total Likes
Thanks
Views
Replies
Total Likes
This totally works... I didn't know where it was headed or why, but it did the trick. Thanks for sharing.
Views
Replies
Total Likes
Radzmar, that sample you provided is amazing, thanks! Your tips and tricks are often found nowhere else.
Views
Replies
Total Likes