Javascript in PDF form

Avatar

Avatar

equipment-studi

Avatar

equipment-studi

equipment-studi

27-06-2016

Hi guys,

I really have some problems with LCD and Javascript. I need three functions which I don't know to use without JS. So I tried JS but it didn't work, too

Maybe someone can help me with these (or at least one) of the following problems:

Start paramenters: PDF file exported from InDesign (IDML -> PDF) with basic form features (buttons). Now in LCD I need to make the finish, because of missing functionality in Acrobat Pro (which works quite better together with ID). And yes, I know that this workflow isn't best to choose, but I have to follow this in order to working in a team.

1. text auto-size: I need auto text size for some text fields. The text should have e.g. size 15, but if the field is full it should make auto size (shrink). I tried font size "0" but that did not work either. So I read about JS for auto size, but it does not like to work for me. I tried a "this.xxx" and if/else but without luck.

2. text overflow: I have multiple text fields for structure which should be filled with the same block of text (e.g. we have space for around 500 words per field and the text is 750 words long - so it should jump to textfield 2 (same page) and insert the last 250 words there.

3. PDF import: I have some images fields for inserting picture into the form. But because I want to insert a changing object (calendar with different month) I need a field, where I can insert a PDF (the calendar is made by a ID plugin, my working mate uses). The input should be in Acrobat / Reader after the form is finished so my mate can to that stuff. I tried an image field with a jpg/png which worked good - but because of scaling I would prefer PDF. So I tried JS (event.target.buttonImportIcon();) which I knew from Acrobat Pro. But that did not worked in LCD.

So anyone any ideas? Would be really happy about!!

Regards,

Florian

View Entire Topic

Avatar

Avatar

equipment-studi

Avatar

equipment-studi

equipment-studi

30-06-2016

Hi Karwan,

I imported every time as fixed layout because otherwise all fields were moved around. But you are right, I think, that I need to use interactive layout and/or recreate some fields to get all functionality from LCD I need. Thank you very much for your support. I really appreciate that!

I try to figure out the gist of point 3. As non-native speaker I'm not so versatile with English.

What I need an image field where an image is displayed to the reader. But this field has to be imported by the user. As far as this a "normal" image field. But the file, that has to be imported / displayed has to be in PDF format.

You know the Acrobat Pro workaround for an image field? https://forums.adobe.com/thread/994408

That is a discussion about that. The JavaScript for that in Acrobat Pro is event.target.buttonImportIcon();

It creates a virtual image field which can be filled with only PDF "images" which are displayed like pictures.

Thanks a lot.

Redards,

Florian