Script menu that affect field properties

Hello

I have a popup menu work, when clicked it lets me change the font size for the text fields in a pdf file.  I want to have the menu to include the option to change the police not only the size of police, including an alert announcing the change. You will notice in the script menu is like I want. I struggled with what I am very new to him. I agree to have the current font/size active (bmarked) in the menu so I know the current setting.  Thank you very much, I have already received very useful assistance here!

TPN = app.popUpMenu (["Document character size", "6", "8", "10", "12", "14", "16"], ["Document Font", "snow"]);
I = app.alert ("you are about to change the font size for all of the fields to:" + fnt, 2, 1);
If (I! = 2)
{for (var i = 0; i < this.numFields; i ++) {}}
s = this.getNthFieldName (i);
f = this.getField (s);
f.textSize = TPN ;}
}
on the other
{
}

Have you read the article in the Acrobat Javascript reference that describes the properties of a field? I have not scripted fonts in acrobat before, but make sure you get the correct syntax to define the name of the font. Examples of reference:

There are several predefined values, you can use standard fonts:

var f = this.getField ("myField");

f.textFont = fonts. Helv;

In Acrobat 5.0 +, you can use an arbitrary font:

Set the font for "MyField" at Viva-Regula:

var f = this.getField ("myField");

f.textFont = 'Viva-Regular ";

But, you must make sure that you use the correct string when you install an arbitrary policy. Type this in the debugger console to determine the correct string to use for the font defined for the field 'Text1 ':

this.getField("Text1").textFont

Tags: Acrobat

Similar Questions

  • JavaScript that affects all text fields

    Now, I'm trying to understand a script that affects all the text fields in the document, there is a button that when clicked would affect all the text fields in the document.

    Thank you

    Is that what you are looking for?

    function processTextFields () {}

    for (var i = 0; i)

    Browse all fields in the document

    var fldName = this.getNthFieldName (i);

    oField = this.getField (fldName) var;

    var a = oField.getArray ();

    for (j = 0; j< a.length;="" j++)="">

    If (oField.type == 'text') {}

    Do something here

    }

    }

    }

    }

  • Text form field properties: access with Javascript?

    Hello

    I wonder if it is possible to access all of the properties of text form field with Javascript.

    The basic game is available under the domain object, but I'm looking for the other stuff that does not specifically exist for the fields of rich text, such as the properties of next paragraph:

    Dashes (left and right, withdrawal, first to the first line indent), the vertical alignment (top, bottom, middle), space above and below and attack (line spacing).

    All this is available if you place your cursor in a rich text field and press Ctrl-E to open text form field properties, then click on "More".

    So I wonder if it is also accessible via JS, because I can't find anything in the documentation on the subject.

    Thanks much for any help!

    Ariel

    Some properties of rich text are available, but not those you mentioned.

    I'm afraid.

    Study of the Span object to find out which ones are.

  • Acrobat Pro DC missing labels for form field properties?

    Hello

    I have a client who uses Adobe Acrobat Pro DC. When she opens a form field properties, while under 'Prepare form', there seems to be some missing tabs. All she sees is General, appearance, Position and Options. She is need to use some other as Action and the Format, but they are not present (not even grey simply not there).

    While I am clear, legs in Red are those that lack us

    Acrobat Missing Tabs.JPG

    I've done the research to the best of my ability and could not find something lack of tabs or features that were not included with the Pro DC version. His colleague has Acrobat Pro 9.2 and these tabs in the properties or the gaze of two identical versions. I don't know if they are something that is not included with DC Pro or if there is something we are missing to enable them? Any help would be appreciated!

    I thank you for your help, unfortunately we could not find the option "Return to the form of Acrobat" at all, but we were able to get the other tabs.

    She informed me that she had converted to a Word Doc with this information we he converted again and opened the new PDF with Acrobat. Then he went an extra step of "Scanning" the document and we then had the additional tabs that we were missing. I think that this extra step "sweep" would have been forgotten before causing the loss of the most advanced tabs.

  • Is it possible with CSS menu that appears when you click the menu button on a menu bar of style?

    I'm trying the menu that appears when a menu button is enabled in the style menu bar. I am able to style the menu bar and menu button in the action bar very well.

    However, I was completely unable to style from the Menu that appears.

    I asked the same question over to StackOverflow.com, but have not yet received a reply.

    Basically I have a menu that is set up as a bar:

    <MenuBar VBox.vgrow="NEVER">
      
    <menus>
      
    <Menu mnemonicParsing="true" text="_File">
      
    <items>
      
    <MenuItem mnemonicParsing="true" text="_New Project"/>
      
    <MenuItem mnemonicParsing="true" text="_Open…"/>
      
    <MenuItem mnemonicParsing="false" text="Quit"/>
      
    </items>
      
    </Menu>
      
    </menus>
    </MenuBar>

    I was completely unable to style the MenuItem or container here when they are indicated. I have dug through CSS of the skin of the Caspian Sea, but was unable to find out what anyone who specifically the. I tried to substitute the values of the ContextMenu, Menu, menu button and MenuItem that is located in the Caspian Sea, but nothing seemed to affect this menu.

    The menu is clearly inconsistent with the menu system, so why am I unable to style it?

    Isn't this possible? It will be possible in the future?

    Thank you for answer two. Unfortunately, what was proposed was not enough to solve the problem by itself. I didn't know that .menu - the point has had a child of .label who could bear the title, but that alone was not enough to correct the problem.

    Fortunately, Uluk Biy on StackOverflow.com was able to answer the question. He stressed that wanted me the property - fx-skin. I realize that I did not provide enough information here for users to come to this conclusion, so I wanted to thank you for helping with the little information you had.

    It seems that, once I've added the property - fx-skin .context-menu, I am able to style menus.

    Thanks again guys.

  • I have a LOT of different Indesign CS6 documents that are field guides, and I would be able to export only the names of species (bold italic)

    Hello

    I'd appreciate any help I can get.  I have a LOT of different Indesign CS6 documents that are field guides, and I would be able to export only the species names (in bold italics) of documents so that I can put in excellent to make a comparison and produce a comprehensive list.  There are several areas of text for each page/species.  The species name is in a single text box, so it is possible to somehow only the bold italics to export a document?  I have a bad feeling, but I thought I'd ask anyway. Thanks in advance for your time and interest.

    Maggie

    Also, sorry if my original question has not obtained the Chief... I'm new to this forum.

    It would certainly be a job for a written custom script. Without scripts, I might consider using the Index feature in InDesign. Indexing is manual work very well.

  • Save several custom fill colors in field properties?

    When in the field properties, if you click the fill color button, it displays a dialog box where you can choose "other colors". Who opened a display window group (screenshot below) "Color" of the buttons on the left side of the base and colors under basic colors, a group of custom color spaces. On the right, there is also an interface to choose a custom color. In the custom colors section, there is also a button "Add to custom colors", which places your custom color as one of the colors shown on the left under "Custom colors"

    It seems that there are spaces to record up to 16 custom colors, but I can never save more than one both custom color. Is this possible?

    See the screenshot below for a Visual of what I am trying to accompish.

    Thanks in advance for any help on this.

    acrobat_fields_custom_colors_window.gif

    First select a custom color.

  • Script to validate a field when submit button does not

    I have a script to validate certain fields and generate an error message if the fields are empty or not filled out correctly. Everything works well except for one of them. I'm trying to generate an error message if one of the fields has an invalid format in it. For example, the format must be "XXXX. XX "(all numbers) so if they enter"XXXX"generates the error message and does not have a shape. I have a setup of the function in this area and it works but unfortunately users ignore the error message and submitting the form when same and this field really need to be right before being transmitted.

    That's what I use for this:

    var bCancel = false;

    var strMsg = "";

    {If (getField("Tracking").value == {/ ^ \d{0,4}(\.\d{0,2})?$/})}

    bCancel = false; }

    If (getField("Tracking").value! = / ^ \d{0,4}(\.\d{0,2})?$/) {}

    strMsg = "Invalid Format. Please correct before proceeding. (EX: 0000.00) « ;

    bCancel = true; }

    So the problem is it generates the error message now even if the format is correct. I do not know I did something wrong, but I wrote the format in the same way (/ ^ \d{0,4}(\.\d{0,2})?$/) when I ran a script to format custom in this area and it worked fine, so I don't know what I'm doing wrong. I am also including this part of the script with the rest of the field controls in the submit button. So altogether it looks like this (just with a lot more fields, does not include all the bc it gets quite redundant)

    var bCancel = false;

    var strMsg = "";

    {If (getField("Tracking").value == {/ ^ \d{0,4}(\.\d{0,2})?$/})}

    bCancel = false; }

    If (getField("Employee_Name").value > = 1) {}

    bCancel = false; }

    If (getField("AcctNbr1").value > = 1) {}

    bCancel = false; }

    If (getField("Tracking").value! = / ^ \d{0,4}(\.\d{0,2})?$/) {}

    strMsg = "follow-up field format is invalid. Please correct before proceeding. (EX: 0000.00) « ;

    bCancel = true; }

    If (getField("Employee_Name").value == "") {}

    strMsg = "at least one required field is empty for export. Please fill the required fields (in bold) before continuing. « ;

    bCancel = true; }

    If (getField("AcctNbr1").value == "") {}

    strMsg = "at least one required field is empty for export. Please fill the required fields (in bold) before continuing. « ;

    bCancel = true; }

    If {(bCancel)

    App.Alert (strMsg);

    } else {}

    this.mailDoc({)

    bUI: true.

    cTo: " ""[email protected]", ".

    ({bassujetti: ' form returned: interview form "});

    }

    I'm fairly new script, especially in Adobe, so I probably did a great job with this. Please let me know if there is anything I should change to make it work better. Thank you in advance for your help!

    Yes, it's really hard to tell what is happening without seeing the file. You can post here, but if you can't post elsewhere (e.g., acrobat.com), feel free to send me by e-mail (see my profile) and I'll take a look.

  • Organize a script menu "fantastic" previous "menu buddy."

    Organize the previous script menu to the menu "buddy."
    Hello to all and especially to Sean.

    I'm new here (... and hopefully, Sean will be not not to be too sorry for that... how ).
    I would like to know if it is possible to organize the script Sean have posted before (Look a discussion 'previous member ('x').) text of the script... »

    used in a menu "buddy" (if it is not too difficult).

    I have a button wherever I want first of all to the menu with the same list Sean solve before for me in a wonderful way as well. I use this form sometimes to script a 'menu bar', and sometimes I need to start from a button.
    Is it possible?
    Thank you.

    You already had code to create a list of members its names from a particular library of cast and a manager of #movie to load a sound name. A quick read of the Buddy Menu documentation should have shown you how to put in place a menu, it is disappointing that you don't seem to have tried it for yourself.

    property myMenuList
    
    on beginSprite me
      myMenuList = []
      nMembers = castLib("sound").member.count
      repeat with mm = 1 to nMembers
        if member(mm, "sound").type = #sound then myMenuList.append(member(mm, "sound").name)
      end repeat
    end
    
    on mouseUp me
      sSelected = bmMenu(myMenuList, 0)
      if (sSelected <> EMPTY) then mLoadSound(sSelected)
    end
    
  • Best way to make a menu that appears on all pages and it's easy to add links to later?

    Hi everyone, first post on the forums.  I am very new with Dreamweaver and creating web pages in general, so patient with me

    Here's what I want to do:

    1 make a website with a menu bar on the left, with about 30 links.

    2. all range from 30 links to different pages on the same Web site, and every page has the same specific provision, only the body of the text is different (same placement of advertisement, menu, etc.).

    3. I want to be able to add links to this menu, quickly and easily.

    In other words, I basically want to do just a static menu that appears the same way on every page of my site.

    Now, how I think is the best to do is to perform a menu its own page (in its own framework?) and just every page on my site for this menu link, so that whenever I want to update the menu, I have not updated the static menu on every page of my site only the a menu.html or something else.

    This is probably the easiest to do in the world thing and I'm probably not using appropriate terminology or anything either, but I hope that I myself have explained clearly.

    Please respond if you have any ideas on how to achieve this.  Thank you!

    Personally, I'd go with a php include.

    I used these charges on my site for the menu, side bar infor and headers/footers. They are dead easy to install and manage and will do exactly what you need.

    simply design your menu is a separate php file (with absolutelu nothing but the menu inside)

    then in the desired position of the menu to appear in your script to

    It cannot be easier!

  • How do I run a script only if the field is not empty

    How do I run a script only if the field is not empty

    Well well, thanks to you, I had a full date on separate days, the months and the years in different areas. But now, I have a problem, as PDF has several fields calculated with script if you enter the date calculated by all other areas, which have separated and undefinied gives me does not want to put this to not always use this field. I tried to put one conditional if else but I sale. Esto, this is what I'm wearing

    var datesol = event.value;//declaramos the variable

    If (datesol = "") {}

    this.getField('yearsol').value = "";

    this.getField('monthsol').value = "";

    this.getField('daysol').value = ""}

    else {}

    var array_datesol = datesol.split("/"); / / separamos esa con date the split funcio

    this.getField('yearsol').value = array_datesol [2];

    this.getField('monthsol').value = array_datesol [1];

    this.getField('daysol').value = array_datesol [0];

    With what they do not separate them now.

    Help please

    As mentioned, you cannot use

    If (datesol = "")

    because that sets the value of datesol to «» (you will need to double for the comparison operator =)

    If you want to run code only if it is NOT empty, while it takes:

    If (datesol <> "")

  • Why I can't "AcrCalibrator" in the "Scripts" menu in Photoshop?

    I bought a controller card to mini color for the calibration of the camera, however, I could not find "AcrCalibrator" in the menu "Scripts"?

    Anyone know why?

    P.S. The "Scripts" menu is the submenu of 'Leader' in Photoshop.

    To calibrate your camera, you would need to take a picture of the color tool.  I guess you knew that.

    The calibration itself is a thing of ACR that has nothing to do with Photoshop.

    A few months ago, you will need to download a third party script, as the calibrator of ACR Fors/Chromohoilc Tomas and run independently.

    It's is no longer necessary, because now there's the Adobe DNG Profile Editor (often confusingly referred to as Parliament), which is a standalone version with several features, like allowing you to generate profiles customized for any device and with a graphical tab called simply rab (sometimes referred to as the graph of the Wizard), which will generate calibration based on your one of your color checker.

    You will need to download and install (it installs the new profiles automatically) the Adobe Digital Profile Editor:

    http://labs.Adobe.com/wiki/index.php/DNG_Profiles:Editor

    http://labs.Adobe.com/wiki/index.php/DNG_Profiles

    With Adobe introduction of the DNG Profile editor, the camera calibration tab was taken to a higher level, and the calibration process takes about 30 minutes less than using the Chromoholics method.

    See this article well written and illustrated:

    http://www.software-cinema.com/blog/2/photo-tutorials/20/Adobes-slam-dunk-the-DNG-profile-editor by jonathan kingston

    You will find all kinds of references on the site of Adobe and Google.

    EDIT: Adding a link more.

    Post edited by: Ramón G Castañeda

  • My Apple TV is making black screen that flickers sometimes snow or in the menu that I delivered on pressing on menu &amp; down and disconnect what do I do now?

    My Apple TV is making black screen that flickers sometimes snow or in the menu that I delivered on pressing on menu & down and disconnect what do I do now?

    Read this:

    Get help with audio, video, or power on Apple TV - Apple Support

  • Don't see the "Scripts" menu under the Setup tab in FDMEE

    Hello

    I'm new to FDM, we recently moved to FDMEE and I tried to access scripts to update, but I do not see the SCRIPT Menu in the FDMEE interface on the Configuration tab.

    Can someone please sugest the solution?

    Thank you

    VJ

    Hello

    What version of PMC are you on? These scripts have not been introduced before a patch of 11.1.2.3 (I think 11.2.3.300, but I will check). So if you are on the basic version then the integration Scripts will not be an option.

  • What is the java script code that makes an annotation appears as flattened (permanent) on a page?

    I have custom dialog box based on the java script code that prompts the user to enter data for a room tag.  This label is then annotated on the pdf document. At the present time, the captured annotation can be deleted.  I want to be show as permanent on the pdf page. 

    Thank you.

    You must flatten the page that this annotation is one to convert static content into PDF. To do this, use the Doc.flattenPages () method:

    The SDK Acrobat DC - Doc.flattenPages () SDK documentation

Maybe you are looking for