Expand my Community achievements bar.

SOLVED

How do I set my form opens just 100% zoom? is it possible?

Avatar

Level 4

Hi.

Is it possible do I set my form to open only zoom 100%? I would like this, because I am using pictures in my form, and then if someone open with larger zoom, the pictures are faded.


I have another doubt. When I am working with my form on the LiveCycle (mode Preview Of Project), it stays perfect (picture and size)! But when ai click to preview it in PDF, the document size stay larger. Why? The document/pictures only stay normal, when I set zoom 90%

Thanks.

Sorry my English.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Rafael,

The best place to deal with this is in the docReady event, as this fires only once when the form is opened

There are a couple of approaches, but this SHOULD work:

event.target.zoom = 100; 

I can't test now, but it should be okay,

Niall

View solution in original post

16 Replies

Avatar

Correct answer by
Level 10

Hi Rafael,

The best place to deal with this is in the docReady event, as this fires only once when the form is opened

There are a couple of approaches, but this SHOULD work:

event.target.zoom = 100; 

I can't test now, but it should be okay,

Niall

Avatar

Level 4

Hi Niall.

How are you?

Why language Should I use? Because I tryed to test on FormCalc ans show an error:

Error: An attempt was made to referenc property zoom of a non-object in SOM expression event.target.zoom.

About my second doubt, Do you know anything about it?

Thank you so much

Avatar

Level 10

Very well, thank you.

The language was JavaScript. I won't be able to check exact syntax until tomorrow.

I do have am example on our website to access menu items, which should deal with this.

I will post again tomorrow,

Niall

Avatar

Level 4

Hi.

Ok, So, I will wait for you.

About my second doubt, would you know anything about it?

Avatar

Level 10

Hi,

Yes, the following Javascript in the docReady event of the root node (eg form1) will open the form at 100%:

event.target.zoom = 100; 

You can also set the page to fit width or height.

I am not sure what is going on when you are opening the form in Acrobat. Can you share the form or post a screenshot so that we can see what is happening.

Niall

Assure Dynamics

Avatar

Level 9

Hello Niall,

Just a query here. If the final form will be opened in Acrobat or Adobe Reader then after the form is developed we can also set the default magnification to 100% and save it. So that when we open a form then the default magnification would be set to 100%. Am I wrong in my approach here ?

Thanks.

Bibhu.

Avatar

Level 10

Hi Bibju,

Yes, that would work as well. The advantage with the script method is that the form will always open at 100%. For example if a user saved a form at 150%, when it is reopened it will revert to the intended view of 100%.

I suppose it depends on what behaviour the form developer is looking for.

Niall

Assure Dynamics

Avatar

Level 4

Hi Niall!

Again man, Thanks so much for all your help!

Please, just one doubt.

Can I open my form just Maximized?

Avatar

Level 10

Hi,

Do you mean 'fit to page'? if so, yes, using the following:

event.target.zoomType = zoomtype.fitP; // fit page

Here are some other options:

event.target.zoomType = zoomtype.fitW; // fit width

event.target.zoomType = zoomtype.fitH; // fit height

event.target.zoomType = zoomtype.fitV; // fit visible

Hope that helps,

Niall

Assure Dynamics

Avatar

Level 4

Hi Niall

How are you?

Today I started with my project and then I discoveryed the problem about my second doubt.

This is following:

When I use the Adobe Reader to open my form, it opens it just 100pix per pol, that's why my form stay with broked design. My form stay correct when I adjusted the configuration to: 96 pixel per pol.

So, Is it possible my form to open just 96 pixel per pol?

Thanks a lot!!!!!!!

Avatar

Level 10

Hi Rafael,

The view property is a percentage and not pixel measurements.

Can you explain "96 pixel per pol"? if it is 96%, then the script should work

event.target.zoom = 96;

Can you post an example or a few screenshots of what you are after?

Niall

Assure Dynamics

Avatar

Level 4

Hi Niall.

You example it worked very well!! I tested it in my project and it is perfect!

But, about my problem above is this following:

By Default, the Adobe Reader opens all form in this following resolution: 100 pixels per inch. When my form is open this way, its images are broked. My form just opens correct if the user change its preferences on the Adobe Reader to view all the files in configuration of the system in: 96 pixels per inch.

Take a look in this option in: Menu Edit > Preferences > PageView > Resolution


That's why I would like that all the users opens my form just 96 pixels per inch.

I hope I have explained correct.

Thanks so much Niall!!!!

Avatar

Level 10

Hi Rafael,

I see the property now that you are trying to access.

Unfortunately I do not know of a way to access or change this property - sorry.

Acrobat1.png

Maybe some else may have a better idea.

Good luck,

Niall

Assure Dynamics

Avatar

Level 4

Ok Niall, but just you attention I already thanks!

I was thinking at putting a alert for the user to change this property, but I think it would be worse.

Thanks you!

Avatar

Level 4

Hi Niall.

I belive that doesn't have some away to change this propriety. I tryed to search but I didn't find.

So, thanks for your reply about the zoom! It was help me very much!!!!!

I chose your reply as the better and correct.

Thank you..!

Have a nice day.