Selection at the level of the document at the level and focus on the width + height of the page

Hello

I've got little experince with ID-scripting. Can someone help me out here? It should be really simple

What I do now is stick my graphics and then check the height of doc in the "Document Setup" and type doc mm height in the scale height field. (Not the height-field, ' caus I want all my selection to scale uniformly!)

Then I centered horizontally and vertically.

If this will not be easy to script? I hope so. THX!

Try now,

var doc = app.activeDocument,
    sel = app.selection[0],
    w = doc.documentPreferences.pageWidth,
    h = doc.documentPreferences.pageHeight;  

doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;
doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
doc.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
var currscale = sel.verticalScale;
    selheight = sel.geometricBounds[2]-sel.geometricBounds[0];
sel.horizontalScale= sel.verticalScale = (((h - selheight)/selheight) * currscale) + currscale;
selwidth = sel.geometricBounds[3]-sel.geometricBounds[1];
sel.move([(w-selwidth)/2,0]);

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • How will I know which pages are selected in the Pages panel?

    I have a JavaScript that exports each page of the separate document as PDF file. I would do the same thing, but with a script that exports only the selected pages in the Pages table. Is there a way to tell which pages are selected in the Pages panel? Thanks in advance.

    -Rick

    I asked a similar question here: information on signs in Javascript

    The answer, @Harbs, was not. You could do your own dialog box to allow users to select pages, but it doesn't seem to be possible to integrate with the existing this way Committee.

  • selection of the page for cards

    What is the page selection for printing of business cards. I know stupid question, but don't see any avery form number come and do not find this stupid thing.  Thanks for any help.

    Hi cirhos,

    You can get a model of Avery to print business cards. I used their models for lables recently, and it was working fine.

    http://www.Avery.com/Avery/en_US/templates-%26-software/templates/cards/business-cards

    Good luck

  • Extra page prints when I print selects only the pages in a pdf

    When I have a several page pdf and I want to print less than the full document, my print job always starts on an extra blank page at the end. If I print the entire document, it does not generate an additional page. I've tested this in Word and Word prints only the pages with none of the additional pages.

    Any ideas what the problem may be?

    Thanks for your help.

    Sorry I'm late getting back. I solved the problem, so in the interest of those who may encounter this problem later, I write I find the solution.

    I tried your suggestion first and second. None worked. I could not try the third suggested fix that I'm on a work computer and apparently did not have the administrative rights to create a new user account (at least, I couldn't figure out how to do).

    After a lot of digging and experimenting, here's what has worked in the end.

    Start > devices and printers > right click on the printer > printer properties > Advanced tab > uncheck "Enable advanced features of print" > apply > OK.

    I have determined that, somehow, it was a problem of separator page, but it's the only way I could find to disable the separator page.

    Hope this helps someone in the future.

  • How to keep the region selected when the page is sent

    Hello

    I created a page with several area equipped with a region selector.

    When the page is sent, the region selector returns to 'show all '.

    I would like to keep the selected region, but don't know how.

    Any ideas?

    APEX version: 4.2.6.00.03

    Theme: 26

    Best regards

    Klaus

    Hi Klaus,

    Please follow the Blog solution

    http://blog.theapexfreelancer.com/2011/11/sticky-region-display-selector/

    Hope this helps you,

    Kind regards

    Jitendra

  • Need to change the field LOV checked a selection on the page of the OFA

    Hi all

    I have a requirement as below:

    I have a customized page of the OPS with an lov field that is mandatory, a checkbox and a two text fields.

    So, based on the selection of the values LOV I'm failing two text field the value automatically.

    My requirement is so when the user selects the check box automatically LOV should be non-mandatory and the user can insert the values in the lov field and the text field and submit.

    SO basically based on selection of field box that I need to make the lov in such a way, he must accept all the values that the user spends instead of checking the query added in VO behind the LOV.

    Please suggest me some tips to achieve this requirement.

    Thank you

    Deb

    Hello

    Instead of create MessageStyledText, create MessageTextInput and set its ReadOnly property to True & False accordingly.

    you will get more information in the link below:

    https://forums.Oracle.com/thread/2226696

    Concerning

    Mahesh

  • How to remove the output of a SELECT on the page out of the Script

    Hello

    I'm running a particular piece of SQL with bind variables. The goal is to get the execution
    plan using DBMX_XPLAN. DISPLAY_CURSOR.

    To get the variables and bind the values of the variables in make them work, I found that I have to select
    instructions in the worksheet, and then press F5.

    It's working very well, but the question I have, is that this SQL data returns more 60 000 rows.

    I don't want to see the lines, and in addition there are limits on the number of rows can be displayed
    in SQL developer.

    Is there a way I can delete the results of the SQL query that appears in the output window of the Script?

    I tried:

    termout off Set
    Set autotrace traceonly
    set pagesize 0

    But nothing makes no difference. Surely I can stop behaving this way? Any suggestions?

    I use SQL Developer 3.2.09

    Thank you!

    Paul Stuart

    Hi Paul,.

    I don't believe it. Same queue the result of a query (whether inline or embedded via @.sql) does not output to the spreadsheet results pane. And internally, to explain the Plan and auto-trace, Developer SQL uses dbms_xplan.display instead of display_cursor.

    Probably your best bet is to reduce total output via Tools | Preferences | Database | Worksheet | Max lines to print in a script. That the setting does not affect the SQL sent to the database, it just limits how the SQL Developer result set that bothers to display when you run Script. Any information you get from display_cursor should be affected. Of course, the worksheet sends many other SQL to the database, that you don't see, so based on the default behavior of 'Look the last cursor' will not work. I assume that you have already taken into account for this.

    Kind regards
    Gary
    SQL development team

  • All the lines in the table of the ADF appear selected when the page loads

    I have a web application which for some adf displayed tables, displays all the lines highlighted that if they were selected. Not all tables in the request to do so, but those who have this feature do it every time.

    I see no difference between the declaration for tables that do not appear as well and those who aren't.

    I use 11.1.2.1 on Windows 7.

    Can someone point me in the right direction? The rowSelection property is set to unique and set apart from that I have no idea where to begin the search.

    Hello

    Just a wild guess here,

    You have the properl PKs defined in these tables?

    Kind regards
    Dimitris.

  • The screen can be cropped in and exported a report width / height custom?

    I think I need a Prime Minister to do something that it simply was not designed to do. Do I have to do is take five or six other screen and audio capture of the same event (a 3D virtual reality teaching session), each representing another person of this event view, assemble in a split screen, synchronize audio Delete, the capture of 'main' designated the other audio tracks and add a title CG labelling each one. The effect is like watching a screen showing six images from security cameras. I know it is possible to do these things first.

    However, I then have to do is to cut back on all extra space on the left and right of this image of the split screen and export the file as a .mov format of image produced by cropping so that videos are as broad as possible and are not deformed resize in order to fit standard proportions. Depending on the size of the screencaps, the .mov that results can have almost a 1:1 ratio. What is essential for this is that the video be as big as possible and the 'black' to be space as small as possible, so that the person who comes in later to analyze these composite videos see just as clearly as possible. I also need to refocus on the fly; because these images are not always captured in the same size, it is impossible to screening a size for the video.

    We used a tool of screenshot to do what works, but a pain; clips can be moved and resized by mouse-dragged, and the software to import and export from its own format owner, which is very slow. However, piece of video editing software 'true' I looked only ever seems to export in formats TV or film. QuickTime Pro looked a bit like the best bet, but it doesn't seem to be able to manage several audio tracks (which are necessary, since I have to synchronize tracks by ear most of the time).

    Is what I'm describing - exporting files .mov while preserving the custom extensions created by cropping when editing - something the Prime Minister can do? If so, it would be something easy enough for beginners to do?

    Stephen_Spider wrote:

    You also say that you don't want no carpet at the top or bottom of the final product. Once again to help monitor HD A as a model, looking something like a pixel of W 214 X 1920Pixel H.

    What is the size of your target display? And do you intend to have all the clips of six aligned horizontally?

    **************************************

    Edit, OK, you gave more information, while I was typing

    Heck, Jive forum also is miserable for not showing the changes.

    If this is the process, which will not work. We will just continue to use our current software. Thank you.

  • Set the focus on the list of selection in the form of the APEX

    Dear friends,
    I want to set focus on the first field of the new line of tabular presentation.
    I used something like that.

    JavaScript:AddRow();
    $('input:enabled:visible:last').focus ();

    It works fine if the first field is the text field. but when I put the selection list in the first field in tabular form, it does not work.

    Can you help me in this problem.

    Thanks in advance.

    This is because a selection list is not an input field. The html code is different, where the selector of is not picking it up.
    If you were to use

    $('select:enabled:visible:last').focus();
    

    He would choose the latest list of selection (on the page).

  • How to reverse the order of the Pages in Acrobat Pro ms

    Old problem but the Javascripts there do not work for me and the whole implementation of scripting in Acrobat Pro MS became more difficult.

    I have books that are crawled back to the front so the PDF on page 300 of the book is page 1 of the PDF and 300 of the PDF page is page 1 of the book

    I just need to select all the pages and reverse their order. But this doesn't seem to be an option in one of the tools for editing, organization of a page.

    Javascripts out there used to add a menu item in the menu "Documents":

    app.addMenuItem ({cName: "Opposite Page", cParent: "File", cExec: 'PPReversePages();', cEnable: 'event.rc = (event.target!}) (= null); ', NPO: 0

    });

    function PPReversePages()

    {

    var t = app.thermometer;

    t.Duration = this.numPages;

    t.Begin ();

    for (i = this.numPages - 1; i > = 0; i)

    {

    t.Valeur = (i - this.numPages) *-1;

    this.movePage (i);

    t.Text = "Moving page" + (i + 1);

    }

    t.end ();

    } / / JavaScript Document

    but I can't find any way to run this script...

    NO.... I went to

    Support/Adobe/Acrobat ~users/mydrive/application

    and there is no "JavaScript" folder there... I made one, put it in the script and restart Acrobat: 'Nada' nothing.

    But back on the web and research: I found this solution that works.

    In Acrobat Pro DC go to

    1. Tools--> [scroll all the way down]-->
    2. Customize-->
    3. Action Wizard-->
    4. New Action--> [scroll the left panel under "choose tools to add :-->
    5. More tools-->
    6. Run JavaScript-->
    7. the new action appears on the right panel-->
    8. "Set your default values: let him-files to process--> file currently open by default.
    9. Under the "execute Javascript", click on-->
    10. Specify the parameters (why he didn't say "Enter your Script"?)
    11. another panel inaugurates his... paste this script:
    12. for (var i = this.numPages - 1; i > = 0; i--) this.movePage (i);
    13. Click OK to close and then save the action...
    14. Asked to name the action,
    15. Name it 'Reverse the Page order' and save...
    16. New action now appears in the action list Wizard Actions "reverse the Page order.

    It works!

    In my humble OPINION of older versions of Acrobat had a menu scripts at the top of the screen, right, totally accessible.

    Of course if you were not 'in' JS you can ignore it... But if you * use scripts *, he is not buried.

    This new UX is one of the worst imaginable scenarios.

    Maybe the Acrobat team has lost it's top UX people?

  • How to get the value of the tree node without reloading the Page. !

    Hello
    I worked with apex 4.2 and I've created trees and as a table to retrieve the date according to the value of the tree node select the code tree something like that

    {
    Select case when connect_by_isleaf = 1 then 0
    When level = 1 then 1
    of another-1
    end the status,
    level,
    'ENAME' as the title,
    NULL as an icon,
    'EMPNO' as value,
    NULL as ToolTip,
    ' f ? p = 36648:34:5234984107903:P40_SELECTED_NODE :'|| EmpNo as link
    "Dept". "" EMP ".
    Start by "MGR" is nothing
    connect prior "EMPNO" = "MGR".
    siblings arrested by 'ENAME '.
    }
    and I put the Page selected node element: P40_SELECTED_NODE. the tree worked well and recover the data in tabular form according to the value of tree node

    My Question:
    1. I want to recover the data without submitting the page where whenever I select the value of the tree make page reload to update the tabular presentation with the new value, there is a way to convey the value of the tree node to point P40_SELECTED_NODE and in the form of refreshment without page reload.

    2-i want when selected in the page tree run process according to the value of the on-set tree node to create dynamic action with (jquery selector: div.tree li > a) but the value of the incorrect node.

    Concerning
    Ahmed;

    Take a look at my sample tree application.
    When you select a node, a details report is updated. That should help you implement for your situation.
    However, one thing to note is the link on each node that you have. Click on a node to redirect to the same page and set the value of P40_SELECTED_NODE. You can keep the element, but the link should go, as it's him "reload" the page whenever you click on a node. Implementation of the action of "onselect" tree and setting the page element to the value of the node that will be in place. Be sure to add the page element in the elements present in the form of tables.
    The reason why your selector didn't return the correct value is that you have a click event bound to the anchor tag in each element of the list. The anchor tag does not hold the real value (usually and id), but holds that the display value. The items list item containing the real value in their attribute "id". Therefore, to get this value you should always inspect the first parent of the clicked anchor tag. (which is another way to solve it, of course)

  • How to start the numbering of the pages on the left side of the spread without changing the layout.

    I'm working on a catalog that must start with page "1" on the left side of the spread. Whenever I put it, the spread moves. I understand books should start on page 1 on the right, but it's what the client asked sadly. I come from a background of Quark where it is easy with no movement to change the beginning of the page numbering. How can I change the page numbering without disrupting the file?

    Thank you

    Serena

    1. Start a new document with page 2
    2. Select all the pages in the page Panel.
    3. In the context menu of the Panel page uncheck enable spreads Shuffle
    4. Double click on the small triangle at the top of page 2
    5. Change the numbering to start with page 1 now.

    That's all

  • How to control the width of a region of the page height

    Hi all.

    How can I control width, height of a page region?. Say you have 4 regions on a page and you want to tightly control these attributes, for example as a percentage of the size of the page.

    Is it possible?, also can be manipulated dynamically?

    Best regards, Luis...!

    Hi Luis,.

    I know not dynamically, but in the attributes of the region, you can add

     'style="width:100px"
    

    (or any value you want 10%, 25% etc.) to control the width
    and to control the height, you have to add:

    (new or any size)
    to the header of the region and

the foot of the region

concerning
Barney

Published by: barneyonfire on January 27, 2012 16:58

Sorry, it has not shown the tags before...

  • CFDOCUMENT cut the last and the first line in the pages

    Hello, all:

    I use the CFDOCUMENT tag to create a pdf file. It's a line of simple text and images (for example, width = height 58 = 58). All right,
    but the last line and the first line fell by half. The line is half pages.
    I have download correction [hf701 - 60212.zip], but have the same problem.

    Please tell me how to set the page layout?
    I use windows XP. the text is displayed as < PRE > tag, pictures < IMG SRC = "" * "width = height 58 = 58 >."

    Kind regards

    There are several fixes to this problem. Latest fixes just be published in the last several days. If you use cfmx7.01, you must apply the hotfix in this technote. This fix should be used even if you have applied the hotfix rollup 2 for 7.01 or you apply the individual hotfix (hf701 - 60212.jar) prior to 04/08/2006.

    If you use 7.02, you must apply the fix of this technical note. Apply the additional fixes to cfdocument, he released with 7.02.

  • Maybe you are looking for