Expand my Community achievements bar.

SOLVED

Page fit to width as default on startup

Avatar

Former Community Member

Hello,

I can put the script below in a button but I want the entire pdf to fit width of window when opened. Every time I try putting the script in an event (like docReady, form:ready) that event still comes before the pdf is finished "loading" and the page zoom goes to whatever arbitrary default its set to. I tried creating a timer that goes off once docReady occurs that would execute that script, but couldn't get it to work. Thats all I could think of.

Any insight would be greatly appreciated. Thanks.

Script:

//Need this to execute as soon as the form is ACTUALLY ready

var

oDoc=event.target;

oDoc.zoomType

= zoomtype.fitW; // FitWidth

Kyle

1 Accepted Solution

Avatar

Correct answer by
Level 10
2 Replies

Avatar

Correct answer by
Level 10

Hi Kyle, here's a post that covers that:

http://forums.adobe.com/message/2060642#2060642

Avatar

Former Community Member

Soooo simple eh. Thanks a ton Jono. My clients will be pleased (without knowing it).

I put the script in the form:ready event. Form:layout event occurs every second click and I want to give my users the option of having their own zoom.

Thanks again.

Kyle