Add a little height to the text box in indesign?

Hello!

I have a big and nice script that applies the changes of height/width of a document based on the object styles, and other settings.

But what I really need, is a script that comes Add a little height to a text box selected. It doesn't have to rely on the object styles and should only apply to a single box.

I learn to program, but have no knowledge in javascript so far...

Is it possible to shoot the script under?

(Source: https://forums.adobe.com/thread/628574)

setBoundsOfObjectsWithAppliedObjectStyle.jsx

DESCRIPTION: change the settings of the applied with a certain style of object

2010/02

var doc = app.documents.firstItem ();

var the_operator is ["absolut", "addieren", "multiplizieren", "prozentual scale"];.

var r = get_param (doc.objectStyles.everyItem () .getElements () .slice (0), the_operator);

var f_objects = get_objects (r.style);

apply_values (f_objects, r, the_operator);

function apply_values (the_objects, r)

{

for (var i = the_objects.length - 1; i > = 0; i--)

{

var f is the_objects [i] .visibleBounds;.

If (r.op == the_operator [0]) / / 'absolut')

{

_y2 var = (r.height! = 0)

? Go [0] + r.height

: gb [2];

var _x2 = (r.width! = 0)

? GB [1] + r.width

: GB [3];

}

Else if (r.op == the_operator [2] | r.op == the_operator [3]) / / oder "multiplizieren" "prozentual scale".

{

var the_div = (r.op == the_operator [2]) / / 'multiplizieren')

? 1

: 100;

_y2 var = (r.height! = 0)

? Go [0] + (gb [2] - gb [0]) * r.height/the_div

: gb [2];

var _x2 = (r.width! = 0)

? GB [1] + (gb [3] - gb [1]) * r.width/the_div

: GB [3];

}

Else if (r.op == the_operator [1]) / / "addieren")

{

var _y2 = r.height; + GB [2]

var _x2 = GB [3] + r.width;

}

the_objects [i] .visibleBounds = [[0] [1], _y2, _x2];

}

}

function get_objects (a_style)

{

app.findObjectPreferences = null;

app.findChangeObjectOptions.objectType = ObjectTypes.ALL_FRAMES_TYPE;

app.findObjectPreferences.appliedObjectStyles = a_style;

var the_result = doc.findObject ();

app.findObjectPreferences = null;

Return the_result;

}

function get_param (_styles, the_operator)

{

var style_names = new Array;

Ausklammern von "CLX Raster []"

for (var a = 1; a < _styles.length; a ++)

style_names.push (_styles [a]. (Name)

var min_width = 140;

var field_width = 40;

myDialog = app.dialogs.add var ({name: "Breite und Höhe von objects verandern"});

with (myDialog.dialogColumns.add ())

{

with (dialogRows.Add ())

{

with (dialogColumns.Add ())

{

staticTexts.add ({staticLabel: "Objektstil:", minWidth:min_width});})

}

with (dialogColumns.Add ())

{

var myStylesDropDown = dropdowns.add ({stringList:style_names, selectedIndex:style_names.length - 1,:min_width}) minWidth;})

}

}

with (dialogRows.Add ())

{

with (dialogRows.Add ())

{

with (dialogColumns.Add ())

{

staticTexts.add ({staticLabel: "Breite:", minWidth:min_width});})

}

with (dialogColumns.Add ())

{

var myWidthTextEditbox = textEditboxes.add ({editContents: "0", minWidth:field_width});})

}

}

with (dialogRows.Add ())

{

with (dialogColumns.Add ())

{

staticTexts.add ({staticLabel: "height:", minWidth:min_width});})

}

with (dialogColumns.Add ())

{

var myHeightTextEditbox = textEditboxes.add ({editContents: "0", minWidth:field_width});})

}

}

with (dialogRows.add ()) {}

{with (dialogColumns.Add ())}

staticTexts.add ({staticLabel: "operation:", minWidth: min_width ""});

}

with (dialogColumns.Add ())

{

var radio_buttons = radiobuttonGroups.add ();

{with (radio_buttons)}

radiobuttonControls.add ({staticLabel: the_operator [0], checkedState: true, minWidth: min_width});

radiobuttonControls.add ({staticLabel: the_operator [1], checkedState: false, minWidth: min_width});

radiobuttonControls.add ({staticLabel: the_operator [2], checkedState: false, minWidth: min_width});

radiobuttonControls.add ({staticLabel: the_operator [3], checkedState: false, minWidth: min_width});

}

}

}

}

}

Ditto var = myDialog.show ();

if(myResult == true)

{

var a_style = doc.objectStyles.item (myStylesDropDown.selectedIndex);

var a_width = Number (myWidthTextEditbox.editContents.replace (', ','.'));

var a_height = Number (myHeightTextEditbox.editContents.replace (', ','.'));

var a_operator = the_operator [radio_buttons.selectedButton]

If (isNaN (a_width))

a_width = 0;

If (isNaN (a_height))

a_height = 0;

myDialog.destroy ();

}

on the other

{

myDialog.destroy ();

Exit();

}

return {style: a_style, width: a_width, height: a_height, op: a_operator};

}

var resizeItem = function(item, h) {
  const cs = CoordinateSpaces.INNER_COORDINATES,
  ap = AnchorPoint.TOP_LEFT_ANCHOR,
  rm = ResizeMethods.ADDING_CURRENT_DIMENSIONS_TO;
  item.resize  ( cs, ap, rm, [0,h] );
  }

var h = new UnitValue ( "2mm").as("pt");
resizeItem ( app.selection[0], h );

Here you are

Loïc

www.ozalto.com

Tags: InDesign

Similar Questions

  • How to add numbers like these on the text and images Indesign

    Hi, I would like to know how this is possible (to add numbers with the black circle to refer to an image on the text), when I copy paste I get the number I guess it's a kind of ascii?

    Thank you

    img.png

    There are some fonts with numbers, but they have a limit on numbers.

    I would create

    1. Paragraph with your desired font, size, and white color style.
    2. Create an object with fill blach and in paragraph style select step 1 created a style.
    3. Draw a circular text frame, apply the style of the object and write the number in there.
    4. Copy the circle and then insert the tool in the desired location and paste it into the text.
    5. Lift the text by clicking the ESC key, paste it on the image.
    6. Adjust the vertical position of the text through a style of object > anchored the parameters of the framework.
  • How can I get rid of the text box in InDesign CS4?

    For some reason, I can't get rid of the surrounding area of my text, how can I get rid of this? The text is also a link so...

    Thanks in advance...

    Open hyperlink Panel, double-click your hyperlink under URL field. Set your appearance of hyperlink´s the form of Rectangle Invisible...

  • How can I view the dimensions of the text boxes?

    The MUSE toolbar (if it is the correct name for it) to view the size - width and height of the text boxes, while I was working on page layout. This is very important with presentations of several columns that are not complying with the grid column - what types of old school like me know that * measures. (Not a description of PC, but that's what they were called in the publishing at least the last 50 years).

    Watch the presentation of my website http://www.londonsriver.com and you'll see what I mean.

    But in the latest version, that happened the next day - it disappeared. It shows the coordinates X and Y, so I can see where is the box (not that I really care). But it does not show the DIMENSIONS which is what I want. They used to be next to the coordinates on the toolbar or Ribbon or whatever this is.

    Am I missing something? I tried several options, but they do not appear. I may be stupid, but I want to just my rear dimensions. Bypass it is laborious: make the first box of the column, and then draw another box above it, and then drag on the second position. And so on. And very tedious if I already have two or three columns of text on a page that I re - works. What should I do? Guess? If they are "similar" to Muse they will even when the site is updated?

    I don't even begin to understand what many new features are Muse - perhaps one day I'll have the time to learn. Maybe my site is boring, but I come from the world of newspapers, is what it is and I know how to do. I want to just my size back!

    Thank you. And by the way, many thanks to all those involved in invent, develop, and deliver the Muse. I can now create pages in minutes, using the same basic page design and modification of the skills that I used for years - instead of living the demimonde of techspeak and coding where another website, construction tools wanted to take me!

    Have a look here:

    I don't get width and height of the menu options

  • The existing letters disappear in pdf when I add the text box

    If I get letters in the text disappearing as soon as I type anything in a new text box. I have acrobat pro 8.1 Windows XI.

    My pdf document looks very good. All the text is there that's supposed to be here. I have to add areas of text on some pages, so I click "Add text", I click on any area in my document and the text box appears. As soon as I type anything at all "random" letters disappear throughout my document. I say randomly is a l e meantime, etc, but it's the same letters of the words disappear each time. A month ago, I was working on the very document that does exactly the same thing and had no trouble adding text without letters endangered.

    I've been playing with it for several hours now and I'm ready to punch a hole in the wall.

    Any ideas?

    Thanks for 'all' the help (I'm kidding, of course) but I figured it out on my own.

    Tried many, many things and what has worked in the end increased the dpi of the pdf when it was created first. I'd put it at 300 dpi, which was the same default setting for all other documents I created and manipulated without a problem, but for some reason, it does not work now. I tried to 600 dpi and it is fine. All letters remain in place when I add new text boxes. Probably the other ppp settings would also work, but I have not tried.

  • Add text without the text box in a form

    How can I add permanent text to a form without using the "Text Box" function?

    In Acrobat XI: Tools - content editing - add text

  • Add a picture to the text in the text box to the location of the cursor through Actionscript and control its reference level

    If I want to add pictures to the location of the cursor in the text box, I need to use EditManager insertInlineGraphic. But insertInlineGraphic offers no parameter to control how an image is placed in the text, such as baselineShift.
    While InlineGraphicElement allows me to well control on image added how is placed in the text through properties such as baselineShift, but then there is no way to add this InlineGraphicElement object newly created as the location of the cursor in the text box!
    So, how do you overcome this limitation? How can I add an image to the text in the text box to the location of the cursor through Actionscript and control its reference level?

    Post edited by: DilipShah

    After you add the ILG, you can find the ILG element by textFlow.findLeaf (cursor location) as InlineGraphicElement and then change its attributes. Or you can just enjoy applyLeafFormat().

    FindLeaf is an important function for navigation in the TLF.

  • How to add create box as well as the text box on a form?

    Hi all

    I got the new requirement to create a form.
    In this form, I have an admin section, where
    I need to display the values like this

    [checkbox] admin, specific group [text box to enter text values]

    value will be like this

    1. checked | Admin, specific group | Design Group

    that means that when the user opens the form, it may be able to view five check boxes with text, next text we need to five text boxes, the user must check the box and enter text in the text box so that the data will be saved in the table.
    I need your help to implement this requirement.



    Thank you and best regards,
    Robette.

    >
    I created a form on view/table, just a form. With that I have three sections, the first section is having

    point of the box so that the name of the check box when the user selects the check box, it may be able to enter text in the text box that appear right next to the name of the checkbox element.

    For example.

    CheckBox and Textbox

    >

    Means that it is not a tabular form. Useful information.

    a. you have a Page of Type checkbox element in the Apex to use? It is based on LoV.
    b. you can position the elements of page using drag-and - drop Application Builder, layout is not a problem.
    c. because it is a Page element, you can easily do Validations, calculations, DAs on it.

    So, what's the problem? You should be able to view the page that you want to
    >
    CheckBox and Textbox
    >

    Concerning

  • Implementation of the text box

    Hello

    I need to put in place the text box in my application. I have created custom textbox his works well, enter when the button I get no second line, but the focus moves to the next field. Please

    class TextBox extends VerticalFieldManager {
        int managerWidth;
        int managerHeight;
        private EditField editField;
    
        int width = Display.getWidth()-70;
        int height = 18;
        int maxvalue=2000;
        public TextBox() {
            super(Manager.NO_VERTICAL_SCROLL);
            managerWidth = width;
            managerHeight = height;
            VerticalFieldManager vfm = new VerticalFieldManager(Manager.VERTICAL_SCROLL |               VerticalFieldManager.FIELD_VCENTER);
            // vfm.setPadding(3,0,0,5);
            editField = new EditField("","",maxvalue,Field.FIELD_HCENTER){
                public void paint(Graphics g) {
                    getManager().invalidate();
                    this.setFont(Utilities.getAppFont());
                    super.paint(g);
                }
            };
            vfm.add(editField);
            add(vfm);
        }
        public void paint(Graphics graphics) {
            graphics.setColor(Color.WHITE);
            graphics.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
            graphics.setColor(0x00000000);
            super.paint(graphics);
            graphics.setColor(0x0BBBBBB);
            graphics.drawRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
        }
        public void sublayout(int width, int iHeight) {
            if (managerWidth == 0) {
                managerWidth = width;
            }
            if (managerHeight == 0) {
                managerHeight = iHeight;
            }
            super.sublayout(managerWidth, managerHeight);
            int iNumFields = getFieldCount();
            int iYPos = 5;
            int iXPos = 5;
            Field fField = null;
    
            for (int i = 0; i < iNumFields; i++) {
                fField = this.getField(i);
                setPositionChild(fField, iXPos, iYPos);
                //get height for layout and height
                int tmpHeight = managerHeight;
                //draw field
                layoutChild(fField, getWidth(), tmpHeight);
                iYPos = iYPos + tmpHeight+5;
            }
            //now we reset our extent to include padding   
    
            this.setExtent(managerWidth, Math.max(iYPos, getPreferredHeight()));
            setVirtualExtent(managerWidth, Math.max(iYPos, getPreferredHeight()));
        }
        public int getPreferredHeight() {
            height = 5;
            int iNumFields = getFieldCount();
            for (int i = 0; i < iNumFields; i++) {
                height += getHeight(getField(i))+5;
            }
            return height;
        }
    
        private int getHeight(Field f) {
            return Math.max(Math.max(f.getContentHeight(), f.getHeight()),f.getPreferredHeight());
        }
        public String getText() {
            return editField.getText();
        }
        public void setText(String text) {
            editField.setText(text);
        }
        public void setMaxSize(int max) {
            editField.setMaxSize(max);
        }  
    
    }
    

    Help me create the text box

    Sorry not looked seriously at your code, but there are some problems with it I think.

    Rather than trying to fix your code, it does the job for you?

    http://supportforums.BlackBerry.com/T5/Java-development/TextBoxField-revisited/Ta-p/548410

  • Custom in the text box parameter CSS region muse cc

    Web design application in muse cc may have an option to add css custom in each text box, to custom design visualization of the text box. as I would like to add the css overflow property in a text box and want to replace the default min-height with the height property property. It generates automatic div id, then here it is difficult to identify the id where to put with own CSS file. so I think it makes sense to add a setting option to add custom css. is it not?

    [Left the generic Cloud forum for program specific forum... MOD]

    You can insert the text box itself with the html code that allows you to add your own code, this would be a way personalized to add the text box, too, feel free to add your suggestion in our ideas section.

    Thank you

    Sanjit

  • Understand the text box

    I'm trying to understand and master the elements of text boxes in Muse.

    Why some text boxes seem to have a minimum size (sometimes) and cannot be resized to fit the text content?

    What does the line in dotted lines in the text box?  It seems to be linked to the entire text box, but I don't see how or why.

    It does not appear in certain text boxes?

    Why some text boxes have no effect on the BG Image.  for example when... Add text in an INFOCYCLER widget, text size box Exchange (even if there seems to be plenty of room for more text) and the bg image is contained in the size of the changes.

    There are many things that will come into force when we add the blocks of text that contains text, such as font, size, spacing between the characters, space after/before, space of text frame, text etc. frame border.

    The dotted line indicates a height for the text frame, if you drag the shorter than the text frame, the dotted line will appear. Muse inserts a style property called min-height in the code that tells the browser which frame should be less high and can develop in height, if the content he dictates.

    Text pixellisent if we use system so fonts on the browser, the text will be rendered as an image.

    Please go through details here:

    http://helpx.Adobe.com/Muse/using/typography.html

    Thank you

    Sanjit

  • Definition of default font for the text box in Acrobat XI

    Projects that I am working, I scan in all copies of documents I acquire and add at the bottom of the first page of the relevant information, that is, the source of recordings, volume, and page, using the tool text box (or typewriter).

    In earlier versions of Acrobat, I could choose a font style once and it has carried over to any subsequent document, I proceeded. In Acrobat Pro XI, it always happens as Minion Pro and I need to change in Arial Black every time. Is there a way to define Arial Black as the default choice for the text box?

    For what it's worth, I use Windows 8.

    Thank you.

    I came across a work-around for this for Acrobat Pro XI.  It is a process in two steps and a little heavy, but it works.

    First, go and add your text box and everything what you need text.  After having done that, select all the text, then bring up a bar of properties of the text box text by placing your cursor in the toolbar area and select 'Properties Bar' top of the page, right click or simply press Ctrl + E.  The properties of the text box bar will appear (floating, but not all the time).  Let the selected text, and then change the font properties to what you need.

    Secondly, deselect the text, select the border of the text box, make a right click and then select "Make current properties default" in the pop-up window.  FYI, the property bar to the box text will be changed from a floating real estate bar at this time, so if you need to make more detailed changes, simply close the bar and back to Ctrl + E to call upwards and make other changes.

    I use Windows 7 64-bit.

  • How to follow the overview of the border of the text box?

    Hi all

    I really need an idea. I use the text box that is mobile. It moves when you drag.

    Now, I want to move only by clicking on the border. If you've seen the text box in powerpoint on that, if you place the cursor on the border it shows a + cursor.

    I would like to implement the same in flex. Does anyone have an idea?

    Thank you

    -CK

    Add a listener to the mouseMove event in the text box.

    ta.addEventListener (MouseEvent.MOUSE_MOVE, onMouseMove);

    private var upperThreshold:int = 5;

    private var lowerThreshold:int = 10;

    private var leftThreshold:int = 3;

    private var rightThreshold:int = 6;

    private void onMouseMove(evt:MouseEvent):void {}

    var isOnBorder:Boolean = false;

    If (your .mouseY<=>

    isOnBorder = true;

    } ElseIf (your .mouseY > = ta.height - lowerThreshold) {}

    isOnBorder = true;

    } ElseIf (your .mouseX<=>

    isOnBorder = true;

    } ElseIf (your .mouseX > = ta.width - rightThreshold) {}

    isOnBorder = true;

    }

    If {(isOnBorder)

    define your styles and watch a mouse down event

    } else {}

    Remove your styles and the mouse to the bottom of the event listener

    }

    }

    In the example above, you also need to listen to a mouse out even so you can delete the styles and the unwanted event listeners.

  • Even the dimensions of the text box

    In an InDesign document, I have two unequal size text boxes.  For the alignment of the layout and distribution reasons, I wish they were the same size.  To do this, I want to my making my small text box the same size as my largest area of text.

    Put apart using the 'Info' feature and manually doing my little box the exact dimensions of big boy, is there a way to do this quickly?

    Seems like a small matter, I know, but I wonder about this often enough during the design that I thought I would ask to get out of my mind.

    What happened to just remove the small box and replace it with a copy of the larger box?

    And do not drag a box to the right size. Just select the large box, look at the width and height of the control panel (window > control) and type or paste these numbers in the fields width and height for the smallest box.

    Ken

  • Reorganization of the text boxes so that they mix upwards or downwards

    Hello

    I'm not sure to understand what happens when the text inline boxes are dragged - I have 6 on a page that are the width of the page but different heights and I would like to re - order them so they mix it up or down depending on where I drag them, but at the moment they go to the bottom of the page or disappear completely I can't work on the behavior.

    I think there must be a way of formatting.

    Thank you

    James

    Select each text box and if you use v5 Pages, visit the reorder menu and text wrapping set to None. Now, the text box are not repellent, and you can position them as you please. If you always use the Pages ' 09 and then again, select each text box and the Wrap Inspector, deselect object causes wrap.

Maybe you are looking for