[JS CS5] How to get custom Page size

I was looking for the answer to this simple question but no way looking around.

I have an InDesign document with different page size for example at left of page width is PT. 621 and on the same document right page width is 837 points.

Now I need to get the width of the pages using script, but the app.documentPreferences.pageWidth return the standard document preset size (PT. 621) no custom page size.

One has the idea to get the size of page customized using script.

Thanks in advance

Mac

Mac,

as the documentation shows there are some new properties of 'page' for InDesign CS5.
Among those who are:

defines the unit of measure (number or string) readonly array limits Page, in the format [x 1, x 2, y2, y1].

So:

myPage.bounds

and pageWidth for the documentPreferences can be:

myPage.bounds [3] - myPage.bounds [1]

unless myPage is transformed (e.g., rotation and/or sheared or scaling) with:

myPage.transform)

void transform (in: CoordinateSpaces, from: varies, withMatrix: varies [, replacingCurrent: varies] [, consideringRulerUnits: boolean = false])
Turn the page element.

var d = app.activeDocument;
var myPage = d.pages[0];

var oldPB = myPage.bounds;

var rAngle = -45;
var sAngle = 40;

var myTransformationMatrix1 = app.transformationMatrices.add({counterclockwiseRotationAngle:rAngle});

myPage.transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.CENTER_ANCHOR, myTransformationMatrix1);

var myTransformationMatrix2 = app.transformationMatrices.add({clockwiseShearAngle:sAngle});
myPage.transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.CENTER_ANCHOR, myTransformationMatrix2);

var newPB = myPage.bounds;

$.writeln(oldPB);
$.writeln(newPB);

Now oldPB and newPB differ a lot.
So, the question remains: what is a reliable way to show whether the myPage was or was not turned against documentPreferences. pageWidth or if my page is of rectangular shape at all. See the ability to add a wide angle of the transformation matrix. Also see screenshot:

Transform_Page_CS5.PNG

Uwe

Tags: InDesign

Similar Questions

  • 4630 printer does not recognize the custom page size

    I print a lot of thank you notes, which are the size of page 6 x 9, and the margins must start lower than the middle of the page. The problem is that the printer won't let me in the custom page size, rather it wants to print A4 size or format card index or one envelope size. How can I make the printer recognize the format of the exact page?

    Hi Scubaluvyand thanks for getting back to me!

    I recommend the rest of this paper on create paper formats in Windows 7

    Please hold me!

  • D110 printer custom page size

    I have a PC of HPE-400y under Windows and Office 2010.  "I have a document in Word that has a size of custom page 5.5" x8.5 ".  It will not be printed on a paper 5.5x8.5.  In Word when I select Preview before printing, the D110 shows up the print, the page size as 8.5x11.  "If I click on the page and go to"more formats of paper and dΘfinir the page size to 5.5x8.5, the box shows custom page size 5.5"x 8.5" with one "! "in the box.  When I click on print, it prints it centered in the middle of a page of 8.5x11.0.

    So I have shows the properties of the D110, and saw that the driver was list as Micorsoft.  So I download the driver full features on the HP site.  It made no difference.

    If I go in Word and open the document and select the printer preview and select Microsoft XPS Document Writer printer, the size of the page shows that education 5.5 x 8.5.  If I then select the D110, it shows the size of the page as letter 8.5 "x 11".

    So, how can I print 5.5 x 8.5 page size in the D110

    HP Chat has solved my problem.  We open the print properties, then choose the features tab.  You click size, and then in the drop-down list, click Custom...    It then opens a window of the custom page size.   In the name field, enter the name you want the custom size to call.  Change the width and length you want, and then click on SAVE and then on OK.

    I then went in Word and the name that I created in the custom page was there.  And it prints correctly.

  • How to get the actual size of control?

    How to get the real size control when the preferred width/height is not defined but control have size which are automatically evaluated (for example contaier with the disposal of the battery)?

    Try the LayoutUpdateHandler: https://developer.blackberry.com/cascades/reference/bb__cascades__layoutupdatehandler.html

  • Create custom page sizes Scan interface

    Is it possible to change the interface of creation of scans of imperial to the metric system for custom page sizes?

    For the first number (support of units other than the inches), the bug has been prioritized, and most likely it will be fixed in future releases.

    The question where she has taken measures in the wrong order, please install the last published update on 11/10/2016. This problem is already solved.

    Thank you.

  • Have on current PC, Win 7 64 bit CS5; How to get *.exe to transfer to the new computer after removal of old

    Have on current PC, Win 7 64 bit CS5; How to get *.exe to transfer to the new computer after removal of old?

    https://helpx.Adobe.com/Creative-Suite/KB/CS5-product-downloads.html

  • Word PDF Custom Page Size on Mac

    Tryinfg to learn how to get a MS Word 2016 on a Mac file to convert to PDF using Acrobat DC without convert my custom 8.5 x 11 page size

    I read on printer settings et al., but can not find something like that in Acrobat.  I would like to start some cusom conversion settings in Acrobat ms before the conversion but can't find it

    Help!

    (Please)

    Hi ed4becky,

    Printing to the Adobe PDF printer is not possible on Mac.

    You can find Convert to PDF settings in Acrobat preferences-> convert to PDF-> MS Word format.

    Kind regards
    Nicos

  • LaserJet 1020: Custom page size that partially prints

    I have a number of Word documents that I customized the size. All this allows to print ok before the upgrade to windows 10. (I just used to cut the paper down set the charger on the printer & print or I used before paper-cutting).  I tried to do it today & I get only partially printed on the page. The printer works fine if not a custom paper size.

    Please help - I've tried everything I can thing including the abolition of the printer, restart your computer, plug in the printer and windows reinstalled automatically.

    Hey @Patbrew, welcome to the Forums of HP! I'd love to help you with the paper size of your client

    Please follow the following steps and let me know the results of your efforts.

    Step 1: Create the new custom paper size

    To set the new custom paper size, create the new size of the printer software.

    1. Go to the control panel and open devices and printers, printers or printers and faxes.

    2. Click on your printer icon, and then click Properties in the print server.

      Figure: Location of the print server properties

      NOTE:

      If the properties of the print server does not appear, right click on an empty area in the Printers window, select run as administrator from the menu drop-down, then selectServer properties.

    3. If the user account control window opens, click on continue.

    4. On the Forms tab, select Create a new form check box, and then type a name for the new format of paper in the name of the form.

      Figure: Forms tab in the properties of the print server

      1. Create a new form

      2. Name of the form

    5. Select metric or English, and then type the dimensions for your custom paper in the width and height text boxes.

      Figure: Forms tab in the properties of the print server

      1. Metric or English

      2. Width and height

      NOTE:

      Let the printer area margins set at 0.00.

    6. Click on save the form, and then click OK or close.

    NOTE:

    Supported paper sizes vary depending on the printer. If you enter the dimensions custom that your printer does not support, the new custom paper size does not appear when you try to print. Check the specifications of the printer for your printer for more information on supported paper sizes.

    Step 2: Select the new format of custom in the printer software paper

    To begin to print on custom paper size, select the new size of the printer software.

    1. In the printers and devices window that you opened in the previous step, right-click on your printer icon, then selectPrinting preferences.

    2. On the paper/quality tab, click Advanced.

    3. In paper size, select the name of the new custom paper size.

      Figure: Paper size with the new selected custom paper size

    4. Click OK.

      The custom paper size is now default paper for all printing on your computer. You can change the default paper size back to the printing options and selecting the desired size.

    Source

    If this resolves the issue, please be sure to mark your post as solved by clicking on the accept button Solution below. If you need help let me know and I will do everything I can to help.

  • Questions regarding the process of implementing container/control. How "parent of filling" and how to get the actual size of the control?

    I'm writing some UI component custom waterfalls. I went if the document several times and still have two questions:

    1. is it possible to adjust the width of the control to fill the container parent without specifying the number hardcoded in pixel? I see many example of code uses '768' as hardcoded width.

    2. I understand that the 'preferred size' could be ignored in some cases. Is it possible that I can get the actual size of the control on the screen programmatically?

    3. is there any signal was issued when a control container/finish covering all of its child nodes? How do I know what size of a control is finally decided?

    Thank you

    mdodd wrote:

    (1) you can use (QML)

    horizontalAlignment: HorizontalAlignment.Fill
    

    or (C++)

    myControl->setHorizontalAlignment(HorizontalAlignment::Fill);
    

    This will cause control occupy the entire width available to its parent. However, keep in mind you may have to use this property on all containers of parent to the node root to get the width of the full screen.

    As far as I KNOW simon_hain is located on the other two issues.

    ((2) & (3) I just dug around and you find LayoutUpdateHandler would do the job:

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__layoutupdatehandler.html

    mdodd answer on question 1) is correct.

    I can't believe they made a separate category for such a common task. Framework of stunts have had some serious consistency problems, that's what I feel.

    Thanks to all who have contributed to

  • How can I change page sizes and icon?

    Original title: icons

    How do we change icon sizes and page, I need someone to help him.  Thanks, Chuck

    Hi Chuck,

    1. What sizes of icon and page are you trying to change?

    2. what version of Windows operating system do you use?

    If you try to change the size of the icon on the desktop, you can try the following steps and check if it helps.

    a. right click on the desktop. Select Show.

    b. click small icons.

    If you are using Windows 7, you can also read the articles and check if it helps:

    Make the text on the screen larger or smaller

    Change your screen resolution

    For Windows 8: put the text on the screen larger or smaller

    Hope the helps of information.

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • How to print custom paper sizes

    I tried to print the DIY wedding programs.  Sizes are 5.5 x 5.5, 5.5 x 6, 5, 5.5 x 7.5 and 5.5 x 8.5.  I have windows vista 64-bit system and my printer is d411c HP envy series.  Can someone help me with this?

    Hey stacie0004,

    The pilot who moved with Envy D411c series printer doesn't have the ability to run custom paper sizes.  However, you can use a different driver such as the HP Deskjet 6980 or HP Deskjet 9800 driver to perform these print custom print size.

    For more information on how to use a different driver click here.

    Make sure that when you select the properties of the printer to the printer to select run as administrator > printer properties to have access to change the driver.  It is a difference of Windows Vista over other versions of Windows.  I hope this helps.

  • How to get the physical size of the screen?

    Hi all

    How to get the physical width and height of the screen (not resolution) in inches or in centimeters?

    Is there a method to do

    Thank you very much

    Display.getWidth () and Display.getHeight () you will get the number of pixels.

    Display.getHorizontalResolution (); and Display.getVerticalResolution () to get the pixels per meter.  Then by dividing appropriately you can find the actual size.

  • How to get the real size of the screen?

    Hi all

    I want to get the size of the BACKGROUND object screen AREA.

    I tried to call

    my_main_screen.getMainManager () .getVirtualWidth ();

    or

    my_main_screen.getMainManager () .getVisibleWidth ();

    But they always return 0.

    How to get this size? Thank you!

    Hey there. You can summarize this article:

    sector screen explained

    then you replace in your test screen

     protected void onUiEngineAttached(boolean attached) {
            String width = String.valueOf(getMainManager().getWidth());
            String height = String.valueOf(getMainManager().getHeight());
            Dialog.alert(width + " : " + height);
        }
    

    That you will get the result. On my 9630 Simulator, I saw the following values for the width and height: 480 and 333 respectively.

    I hope it works for you.

  • How to get the page change event?

    Hello.

    I know that get changed event document as ISignalMgr-> GetServiceID of CResponder::Respond.

    But how to get the event page?  average of the event's page add, delete, etc...

    Thank you.

    Hi K159,.

    You can spy on the InDesign debug Test/Spy/SpyPreferences menu for the observer notifications. Can add or remove a page and to analyze the output of the spy.

    On the kDocBoss, there is an interface IPageList form you can get the number of pages.

    Markus

  • How to get a Page break before Inline TOC in EPUB?

    I export an epub book file.  The table of contents are created correctly online, but I can't yet find a way to get a page break right in front of her.

    In the export-> advanced EPUB Options, I chose Split Document-> export tags to paragraph Style to light.

    The header of the table of contents (saying "Table of contents") has the paragraph style "TOC direction.» In panel-> paragraph styles change all the tags to export, I checked the box for 'Split EPUB' next to the 'Table of contents for the topic' style.

    But after exporting, there is no page break before the header of the table of contents.

    How can I fix this?

    Thank you very much in advance for any info.

    Basically, I think that you are doing it correctly. I met the same problem. What I found is that the title of the table of contents PLACE (using the page layout > Table of contents function and place it on the page) will not work to make a page break. This is a special type of object, because it can be updated by the update command Table of contents.

    You need to do a work around: you need to create a "Table of contents" in a separate frame and apply the paragraph title style Table of contents.

    In the style of table of contents, include not happy for the TOC title. Check out the screenshots below of my OCD.

    By separating the "content" in its own frame, it works in EPUB:

Maybe you are looking for

  • PowerPoint to video

    Is it possible to save a powerpoint presentation, with animations, as a video file? Lots available for Windows, but can not find one for Mac. QuickTime does not work when the presentation is running and to support the entire screen, that is to say, c

  • Error code: 80072EFD, impossible to find the solution to make windows update work

    OK, so I just recently returned from the school where Windows Update worked perfectly.  When I got home he stopped work at all, give me the error code: 80072EFD. (I'm using Vista Ultimate 64 bit)  I tried everything on the support page and nothing wo

  • No drivers for Windows 7 for HP Pavilion G6-2260sh

    Hello I recently bought a laptop HP Pavilion G6-2260sh. on the site of HP Unfortunatelly there are only drivers for Windows 8. I don't want Windows 8, I need Windows 7 operating system.When I got the laptop there is an installed Windows 7 Ultimate wi

  • Windows search service couldn't start. The system does not have the specified path. How can I fix it?

    I'm having a problem where IE takes up to five minutes for a web page.   I see the mistake of follow up in the event viewer: Log name: SystemSource: Service Control ManagerDate: 14/08/2012 21:14:10Event ID: 7000Task category: noLevel: errorKeywords:

  • Windows 7 blue screen... BCCode: a

    I was recently watching a movie on my laptop when suddenly "blue-screen" appeared with error codes. My laptop then restarted and it happened again. I then waited so he can restart once again, however, I started windows in safe mode and then rebooted