Script to display the size of InDesign pages instead of the size of the Document format

Hello, I have been very kindly helped with the script (using a text variable), which displays the size of the current page within an InDesign document below.

The result gives it is based on Document format, and I was wondering if it was possible to amend it to base the result on the size of the Page instead (as you can now change the size of the page regardless of the configuration Document in InDesign using the Page tool). I don't know anything about the scripts by the way!

Thank you very much in advance for any help.

var doc = app.activeDocument;

doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;

doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;

var l = doc.documentPreferences.pageWidth,

h = doc.documentPreferences.pageHeight,

PageSize = app.activeDocument.textVariables.itemByName ("PageSize");

pagesize.variableOptions.contents = h + w + "X mm", "mm";

Try this,

var doc = app.activeDocument;
doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;
doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;
for(var i =0;i

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • CC2015: Display the document with its print in Design view style rules

    A style sheet may contain rules that only effects of impression.

    Example:

    @media print {}

    How can I view a document in design mode with these rules, taking effect?

    In other words: I want to display the document as if you choose ' file > print preview "in a browser.

    In the old Version of Dreamweaver, there was a command "View Menu > use Style > Print Media" (I'm not shure which is the name in English, because I use the interface in German).

    Thank you.

    Hello

    I'm sorry to inform that this feature has been deprecated in Dreamweaver CC

    https://helpx.Adobe.com/Dreamweaver/using/the-new-modernized-Dreamweaver-CC-III.HTML#view

    As a work around you can do file > Preview in browser Page and then print from browser to check the preview before printing.

    Concerning

    Vivek

  • PowerCLI script to display the number of vCPU by VMhost use

    Hi all

    I'm looking to get help here with powerCLI script to list each total number of ESXi vCPU host that is used to determine if there are any ESXi host CPU is more engaged.

    According to suggestion of performance in some blog vExpert, is around 1: 3 of Jepp core ratio: vCPU allocated, then how to display the report with the powerCLI for something like this:

    PRODESXi01
    Total of nuclei available: 32
    Used by the virtual machine: 28

    PRODESXi02
    Total of nuclei available: 32
    Used by the virtual machine: 38

    So according to the result above, the PRODESXi02 is more committed by 6vCPU allocated to the virtual machine.

    Note: The available total carrots is taken from the value of logical processors from the contents tab, when you click on the vSphere console.

    How to get this report using PowerCLI?

    Thank you

    You mean something like this?

    {Foreach ($esx in Get-VMHost)

    $vCPU = get-VM-location $esx | Measure-object-property NumCpu-sum | Select - ExpandProperty sum

    $esx | Select Name,@{N='pCPU'; E={$_. NumCpu}},

    @{N = 'vCPU'; E = {$vCPU}},

    @{N = "Ratio"; E = {[math]: Round ($vCPU / $_.)} (NumCpu, 1)}}

    }

  • PS the script to display the virtual machines that reside on a specified vSwitch

    In the process of migration of virtual machines to vSphere 5 Cisco Nexus 1000v running.  However, I need to generate a list of VMS still residing on the old vSwitch in a datacenter.

    I know the powerpack VMware display the VMCount, but it would be useful to be able to run the script every morning and send the list of virtual machines residing on the old vSwitch automatically.

    VCenter 5 running.

    You have probably more than 1 portgroup with this name

    Try it like this

    ## name of portgroup whose VMs to get info on $strPortgroupName = "MyPortgroupName"
    ## Get the View object of the Network of the given name, then get the View objects of the VMs on that network, and return the VMs' names Get-View -Id (Get-View -ViewType Network -Property Name,VM -Filter @{"Name" = $strPortgroupName} | %{$_.VM}) -Property Name | select Name
    
  • Need a script to display the hidden field if number = 568845

    Hi all

    Using Acrobat Pro 9.1 on iMac with OS 10.6.8

    I am working on a form to fill out and need a script to display a hidden field when a button is clicked.

    I've set up a numeric field to type a number, and the hidden field is "text1".

    Now, I need a script to the button open only the hidden field, if the field number = 568845

    In this way the customer can fill in the code and then show and type in the field.

    Any help would be appreciated.

    Ron

    Given that you use it by a button, you can't use event.value because a button has no value, and in any case, you want to check the value of another field. So this place like your button MouseUp event (of course, you have to adapt the name of the text field...):

    If (this.getField("Text1").value == "568845") {this.getField ("Hidden_Field") .display = display.visible} else {this.getField('Hidden_Field').

    display = display.hidden}

  • How to display the document in adf UI of UCM using resourceId?

    Hi all

    I have a need in application composite oracle webcenter. I have a few tables such as Department and Department_Dos. Department of earch have certain documents. I have ADF UI when I show master-details table service that it will show the documents row tables related to the selected Department

    Here, my requirement is to table documents I resource ID which is UCM document resource ID.in table I have to show some id to link resource. If I click clink I open corresponding doc UCM resource id, I need to show in popup/page like this.
    How can I integrate this way please give me a solution.



    Concerning
    Siva

    solved by using this link http://jonathanhult.com/blog/2012/12/ridc-examples/

    Concerning
    Siva

  • Cannot display the document Image Viewer Image IPM

    Imaging Version: 11g (11.1.1.8.0)

    I have a scenario like below.

    1 created an application in Imaging

    2 downloaded a document imaging against the application being created above.

    3. define a search of the application profile.

    4. what research for documents, the downloaded document.

    5. when I try to open the document in the Viewer, in the face of the slot issue.

    A cache exception has occurred. J2EE YCW-044, an exception occurs in the method. CacheAccess.get transformation of base document J2EE YCW-043 exception error: it was a mistake to launch the external transformation process: 198 unknown error of transformation with code: 198

    To download and view locally, use the download menu item in the file menu of the Viewer.


    Image Viewer Error.PNG

    6 but able to download the document and view it without problem.

    Please suggest how to solve the problem face @ #5.

    Thank you

    Abhishek K

    Jiri, thanks for the useful comments.

    Found the references below and work on it. Will update once done.

    https://support.Oracle.com/epmos/faces/DocumentDisplay?ID=1996164.1

    https://support.Oracle.com/epmos/faces/DocumentDisplay?ID=1544938.1

    Thank you

    Abhishek K

  • How to display the document toolbar

    I can't get the document toolbar to show.  Help, please

    Go to view > toolbars > check Document.

  • How to make a table of contents reflects the document formatting?

    I use a table of contents for a long document. In the document, some special words - the titles of the texts that I write about - italic. But when they appear in the Table of contents, they are not. Part of the table of contents and problematic subheadings are shown in the attached images. I can do all the headings / subheadings italics, but I don't seem to be able to reformat the individual words, I can find no option for the table of contents to reflect the formatting of the titles themselves. I'm heading to the last resort of manually typing all the senses...

    V4.3 Pages ' 09, or Pages v5.6.1, will resume the paragraph/character in the body of the document style attributes in the generated TOC. To a certain extent, you can customize the table of contents thereafter.

  • Can I print the document formatting control information

    Is it possible to print, for example, all the paragraph with their details from development format in the form? I wish the same thing for characters, conditional text etc. formats. ?

    I am a long time use of FrameMaker and built many models over the years. The only thing that I've always found missing was the ability to print a list of the different formats so that you can revisit (much more easily at a time on the screen) to make sure they have all the correct settings. MS Word, at the time of the BACK, had this ability, and it was a quick and efficient way of double checking all the formatting.

    Does this feature exist in FrameMaker? Or are there utilities out there who would do that?

    Thank you

    Inge

    Another set of utilities that list the entries in the catalogue and their respective values are Silicon Prairie software (Silicon Prairie - produced FrameMaker)-see the paragraph and character tools (note: they list more than just the values!). The price is $10 per tool for most of them.

  • Script to display the VM who do not respect the rules of the DRS

    Hello

    I'm looking for Powercli script to get some information from DRS rules:

    I explain the details of the bellows of the application

    I have 2 DRS rules:

    The first rule (R1) run several VMS on ESX Details. The ESX name starts with SRV1xxxx... The virtual machine are on data warehouses whose name starts with DTX1_...

    The second rule (R2) run several VMS on ESX Details. The name of ESX starts with SRV2xxxx. The virtual machine are on data warehouses whose name starts with DTY2_...

    For 2 rules above, I need to be sure that VM running on the datastore DTX1, are on servers ESX, named SRV1xxx, then VM that are running on the DTY2 data store, are on the ESX servers named SRV2xxx

    Summary:

    Rule 1: List of virtual machine that runs on DTX1 and SRV1xxxx

    Rule 2: List of virtual machine that is running on DTY2 and SRV2xxxx

    The script should check and view the virtual machines that do not respect the rules. For example, if a virtual computer runs DTX1 and SRV2xxx, or a virtual computer runs on DTX2 and SRV1xxx, I need to put the name of the virtual machines in an excel file and send the result by mail.

    Thanks for your help.

    Kind regards

    Try this variation

    Get - VM |

    Select Name,

    @{N = "Datastore"; E={$_. ExtensionData.Config.Files.VmPathName.Split(']') [0]. "Split('[') [1]}},"

    @{N = "Iddm"; E={$_. ExtensionData.Config.Files.VmPathName.Split(']') [0]. Split('[') [1] - match ' \D+(? \d+)\D+' |) Out-Null; $matches ['number']}},

    @{N = 'ESXi'; E={$_. VMHost.Name}},

    @{N = "ESXid"; E={$_. VMHost.Name.Split('.') [0] - match ' \D+(? \d+)\D+' |) Out-Null; $matches ['number']}} |

    where {$_.} Iddm - not $_. ESXid} |

    Select the name of the data store, ESXi

  • How to use the script to display the number of columns contain no data

    I have a requirement. There is a source that is the excel, the excel file file, we need to load data into the staging table. There are 5 columns mandatory ones must not be null. We used "No. Data Check" for this. The logic is so mentioned previously mentioned 5 columns don't contain any record that the record will be moved to without data. So far, it is fine. Now the requirement is to show what column or columns contain no data. We used a script to do this like:

    RES =' '

    RES = input1 [0] + ": failed because values null in required columns;"

    INPUT1 [1] = res;

    Output 1 = res;

    But it shows message "down because of nulls in the required columns", which is a generic message. We must show what column or columns does not contain the value "failed because of null values in a column required columnA, columnB or columnC. Can someone help me in this regard. Any kind of help is appreciated.

    You can use the variable inputname1, which keeps an array of names of the entry for the script processor attribute. For example:

    var result = "";

    var first = true;

    for (i = 1; i< input1.length;="" i++)="">

    If (input1 [i] == null | input1 [i] == ' ') {}

    If {(first)

    Firstly = false;

    } else {}

    result += "";

    }

    lead inputname1 += [i];

    }

    }

    If (result.length > 0) {}

    result = "failed due to null values in the following mandatory columns:"+ result; "

    }

    Output 1 = result;

    Kind regards

    Nick

  • my printer prints in a weird format from the internet. Looks like lines of script rather than the regular format. any suggestions?

    Every time I have print an article from Internet Explorer, it prints like this...

    I don't know much about computers, but for me, it looks like lines of script.  Why it is not printing in regular format?  What can I do to fix this?

    Thank you!

    From my research, the problem may occur if IE7 isn't the web browser by default. I understand that you have tried to define default IE7. At this point, please follow the steps below to check if it:

    Step 1: Set default IE7 in IE options
    ========
    1. open Internet Explorer Page

    2. click on tools (usually in the upper right corner) and go down to Internet Options

    3 switch to the tab programs, click "Make default" under "Web browser by default" if IE is currently not the default browser.
    4. click on OK.

    Step 2: Set IE as default in Set Program Access and computer defaults
    ========
    1. click on start, and then click default programs (you can find it in the control panel if you do not have a shortcut on the start menu)
    2. click on "set program access and computer by default.
    3. Select custom, and then click to expand the options.
    4. Select "Internet Explorer" as default web browser, and then click OK.

    Step 3: Check the associated registry key
    ========
    1. Click Start, type regedit in the search box and press ENTER.
    2. navigate to the following key:

    Mand HKEY_CLASSES_ROOT\InternetShortcut\Shell\print\com

    3. in the right pane, check that the (default) value data are defined as follows:

    "C:\Windows\System32\rundll32.exe" "C:\Windows\System32\mshtml.dll",PrintHTML "%1"

    4. exit the registry editor.

    Then, restart the computer in order to check the result.

    Source: http://www.technibble.com/forums/archive/index.php/t-6882.html

  • Display the Documents Reader in Internet Explorer:

    How do hide you the buttons in the right part of the screen fx export in PDF format? I need space to display documents on smaller screens

    Hi paulk3058735,

    First manually hide the tools Panel.

    Then uncheck the option 'pane Open tools for each document' under ' Edit > Preferences > Documents.

    Let us know if you need additional assistance.

    Kind regards

    Meenakshi

  • Cannot display the column format in SQLPLUS.

    Hi all

    Why my sqlplus just displays # when I run sql > column group # format a20;

    SQL > column group # format a20;
    SQL > select group # log v$.

    GROUP #.
    ----------
    ##########
    ##########
    ##########
    ##########

    Help, please!
    Thank you!

    Welcome to the forums!

    Try:

    COLUMN group# FORMAT 9999
    

    You try to provide a column for a VARCHAR2 format, but the data type is NUMBER.

Maybe you are looking for

  • How can I stop my police in failed mail at the time new Roman apple sent emails

    How can I stop my police in failed mail at the time new Roman apple sent emails

  • Then Toshiba send me a new windows disk?

    I brought my laptop for Christmas, he came with a windows disk (they can be on at the bottom of the box, I'll check when I get home) but came pre-loaded with Windows Vista.I have a few XP discs but I don't want to go back to XP now.So, if I don't hav

  • VISA waiting on user event

    I have a producer/consumer program that uses an event Structure to manage the keys of the user interface.  I want to be able to use the VISA waiting on the event to read the characters of the RS232 port.  So I created my structure of the event a case

  • LGS116 has stopped working

    I just installed the LGS116 w / PoE + while moving a client in a new building and it was working fine, then 1 single device was connected and the rest went dark. I think technology autosence close all except 1 port for energy savings. It is only in u

  • Cannot get Sound Blaster Audigy SE SB0570 drivers to install correctly

    Windows 7 32 bitMobo Gigabyte GA - M61P - S3 MB (nvidia/AMD compatible)Sound Blaster Audigy SE 7.1. I tried to install the XP drivers in compatibility mode, Windows 7 drivers, published by Creative (SB24_PCDRV_LB_1_04_0090), created by Daniel pilots