resize/transform pageitem - centered on the page/double

I got pretty much everything done I want to my current project, except that I'm struggling with how to resize or transform a the center of a page or spread pageitem (I'll finally have to do both). To complicate things, I got different references from different sources for enumerations same (CoordinateSpaces.spreadCoordinates or CoordinateSpaces.SPREAD_COORDINATES), and I tried both, but without success on either front. Here are some of the things I tried (a reference to a "pi" pageItem a scaleMatrix 'myScaleMatrix' and the scaleFactor = the percentage I want to evolve IE 1.25):

PI. Transform (CoordinateSpaces.SPREAD_COORDINATES, AnchorPoint.centerAnchor, myScaleMatrix);

PI. Resize (CoordinateSpaces.spreadCoordinates, AnchorPoint.centerAnchor, ResizeMethods.MULTIPLYING_CURRENT_DIMENSIONS_BY, [scaleFactor, scaleFactor], true, false);

Can someone help me with the right line of code to scale a pageItem in "scaleFactor" since the center point of the page and spread, so I can get this working properly? And any direction that might help me understand the different parameters and their use would be helpful. I read through everything I could find on the transformation matrix ", but I can not wrap my head around what I'm doing wrong."

Hi Mark,

This can help you:

http://forums.Adobe.com/message/4179133#4179133

So here's a possible approach if you use ID CS5 / 5.5:

// . . .
// Assumed that a page item 'pi' is already defined
// ...

// Settings
// ---
var SCALE_FACTOR = .5,        // 50%
    PAGE_CENTER = true;    // use page relative origin?

// Compute the transformation origin
// (Note: parentPage was not available before CS5)
// ---
var ref = PAGE_CENTER ? pi.parentPage : pi.parentPage.parent,
    origin = ref.resolve(AnchorPoint.CENTER_ANCHOR, CoordinateSpaces.PASTEBOARD_COORDINATES)[0];

// Scale
// ---
pi.transform(
    CoordinateSpaces.INNER_COORDINATES,
    origin, // absolute coord. in the pasteboard space
    [SCALE_FACTOR,0,0,SCALE_FACTOR,0,0]
    );

@+

Marc

Tags: InDesign

Similar Questions

  • How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    How to generate the alert when pageitem move on the page? and what class boss be use to move pageitem

    Hi Philippe,.

    You can see the kDocBoss for the ClassID with the PMIID IID_ITRANSFORM_DOCUMENT kLocationChangedMessage.

    Markus

  • Explorer 8 resizes by clicking anywhere on the page

    I use a Toshiba A-205 with 2 gig of ram windows vista home preimium and all other standard periphierals and updates.
    Since I received the laptop everytime I use explore when I click anywhere on the page of the window will be low size itself or restore it's self without warning. The big problem is that it will not always it.
    I talked to Best Buy, where I bought it and they will be only reformat the hard drive (for a cost of course) but other than that the tech have no idea what the problem is.
    Someone outhere have an idea?
    I dragged the window to fit, but this does not appear to have solved the problem.

    Thanks in advance

    Fuzzy164

    Hey,.

    Have you tried another browser?
    In my opinion, Internet Explorer 8 is a bit slow so I m using Mozilla Firefox. I can really recommend this browser.

    Is - this alterative for you?

  • Centering of the pages of the web site in Dreamweaver

    I was wondering if anyone know's how to center the pages of the web site using CSS if it is possible, if not what else?
    (I use 8 or MX)

    It depends on if you use absolute positioning on the page, regarding
    method which might be the best, but in both cases, this won't work-

    -Change

    on this subject.


    -change

    on this subject.


    and this-

    on this subject.



    and see if that helps.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "evanescence86" wrote in message
    News:evdmo5$7HF$1@forums. Macromedia.com...
    > I was wondering if anyone know's how to Center your website help pages
    > CSS if it is possible, if not what reverse?

  • Logo will remain centered on the page of a sensitive site

    I tried to install which would very probably be simplest startpage never... a white, centered logo on a gray background with an e-mail link. Sounds simple, right?

    The problem is, whenever I have to resize the window to see how it reacts, the logo begins to descend down, and once the window is made really small, it simply disappears. All I want is for the logo to stay in the Center, that's all. No matter how I pin, she always disappears when the browser window is too small.

    Is there something I'm missing here? Something so simple that it gets quite boring... If it was just a homepage for my part, I'd be inclined to let it go but it is for a customer, and I want to offer the best service possible.

    I saw a similar question on this forum, however the user has only received links to the tutorials, I looked through, and I'm always looking for answers.

    Try this code

    Insert it in the head of your page (the property Page / Html for the head)

    This code only for the project that you have posted here. If you want to use in another project, you must find and replace the object id and sizes

  • Website not centered on the page layout, but it is on Internet Explorer, what could be the problem?

    My website www.thegreatestmindsofourtime.com/downloadpagemain.htm
    not getting centered when displayed with Firefox.

    But if I use internet explorer, it is worn as it supposed to be.

    This CSS rule works for me on Linux to Center page.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Resizing automatically and put on the page?

    On rotation, the WebWorks has no support for setting or automatic resizing in page?  Or when I get a rotation event, I need to move things by hand to fit the new direction?

    Gluth great response!

    I wanted to add a few comments of my own:

    The Web engine will automatically try to resize your content when you change the orientation of the device.  If you have a good window and as mentioned gluth, use relative sizing so it should evolve according to the new width of the screen.

    However, you can also listen to the orientation change event:

    http://BlackBerry.github.com/WebWorks-samples/kitchenSink/HTML/browser/orientation.html

    Finally, the questions from the media are supported on PlayBook and BlackBerry 10 Dev Alpha.  These powerful techniques facilitates design CSS for the different screen orientations:

    http://BlackBerry.github.com/WebWorks-samples/kitchenSink/HTML/CSS3/mediaquery.html

  • RH8: Centering table page Centers text within the page

    I have a webhelp imported from MS word with plenty of tables. I used a table style to set up tables in word format.

    What I want: table centered on the page. Text inside the left-aligned table.

    What I get previews and webhelp output: Table centered on the page. Text inside table centered in the table

    (In the editor of HR, the table looks at how I want it with the table centered and text aligned to the left)

    I tried setting the text on the normal style, but has done nothing.

    I know I can manually edit the HTML code, but I don't have the time to do it.

    Please see point 24- http://www.grainge.org/pages/authoring/rh8/using_rh8.htm

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Do find on the page reposition the bottom in v.15.0.1

    In previous versions of Firefox, find on the page (Ctrl + F) to reposition the page to place the text found at the bottom of the window.

    With version 15, Firefox positions the text found in the middle of the window.

    How can I make Firefox v15 return to the old system and position the text found at the bottom of the window?

    Do you have what version of Firefox ever used?

    The result of the search is now centered on the page as a result of bug 171237.

    • bug 171237 - Search Page: result highlighted should be in the middle of the page (centered vertically) instead of the last line/bottom of page

    (Please, don't comment in bug reports)

  • Cross-references in the output PDF from Framemaker: how to center the Pages?

    I think I understand quite well the functioning of cross-references in Framemaker, but one thing that bothers me, it's how, when you generate a PDF from Framemaker file and clicking on a reference, the resulting page view locates the cross at the top of a page reference marker.

    It's very annoying and confusing when, say, referring to a figure of legend that appears at the bottom of a page. Page display that results when such a reference in a PDF document after Center the text of the _following_ page, with the text of the legend of the barely visible figure at the top of the page.

    My question: is it possible to build cross references that show the page, when you click in a PDF document, is centered on the page that displays the cross-reference material?

    Thank you very much.

    JMW

    Not AFAIK in FrameMaker.

    But in Acrobat, set the initial view one Page instead of continuous.

    File > properties > Initial View.

    Two upward (direction) and two up (cover Page) would also work.

  • How to retrieve the page number of a page

    Hello

    I need to retrieve page which have been implemented with InDesign pages numbers. However, these page numbers are generated automatically based on markers (formula) created by using a master page. (Insert special characters-> markers).

    When I try to retrieve items from the page on a page, I'm not able to obtain the page number. If I try to get the pageitem corresponding to the page number of the page master, I retrieve the marker but not the page number that is on my page.

    I wonder if there is any way I can retrieve the page on a given page number using the SDK

    Thank you very much

    Sam

    Hello

    Have you tried GetPageString of IPageList?

    Concerning
    Bartek

  • [JS] Moves the position of the Page in CS3/CS4? (like CS5 page.transform)

    When resizing a default document, InDesign uses a central point of reference. In CS5 and then I know that I can use page.transform to move the position of the page where I want (art does not, move the page under art). Is - there anyway do the equivalent in CS3 or CS4?

    To say it in other words, after you resize the width of the document, the art is not in the right place on the smallest width of page. Y at - it an easy way to position/move the page under art, or should I spend all the art page? If I have to move all the art, is there an easy way to do this considering that there may be several layers, objects/layers locked?

    I hope that makes sense. Thanks in advance,

    Dan

    N °

    You will need to loop through all the pageItems and move them individually (check if they are locked as you go...)

    Substances

  • Disappearance of the double arrows attached to the edges of the page

    I can no longer resize my pages by dragging them with the mouse, because the double arrows on the edges of the pages no longer appear.  I'm NOT in full screen - I checked.  How can I get service back the double arrows at the ends?  Please, I beg you!

    What program has this problem?  Also, do you see the colored edges where you try to drag?

  • Muse cut the part left my site when resizing the window of the browser for anything whether it is less than the width of the page

    When you use centering nychtemerales, Muse cut the left side of my site when re the sizing of the window of the browser for anything less than the width of the page, this also happens on mobile devices.  How can I keep the page focused but have content basically left stop when resizing or viewing on a mobile screen? I don't want the edge of the page to disappear on smaller screens and when you use a smaller window. I do not want to resize the entire site at a lower resolution. Thanks in advancearbubaproblem.jpg

    If the left is cut, then you have designed offshore from the left of the page mode Design of Muse. The blue guides indicate the edge of the page and a margin guide on the page. Rule zero is the left edge of the page.

    The page is not admissible it will focus as long that the browser is wider than the page. Then, she left aligned (on point zero on the sovereign in design mode).

  • How to stop taking control in the page from popping up every time I double click on the firefox desktop icon?

    Pop - up when I double click the icon of firefox on the desktop, the home page and control of two-page fact sheet page. How to stop taking control in the page from to appear repeatedly when I double click the icon of firefox?

    You can solve this problem with the file blocklist.xml was forced to update.

    See:

Maybe you are looking for

  • Toshiba Store Tv 1.5 - subtitles

    Hello everyone.I m new in this forum that I recently had a Toshiba Store Tv 1.5.First excuse my ignorance as Im not very in all technologies of this and everything, and my query may seem silly... I wonder how can I put subtitles for movies Im store i

  • Create plots by programming/hide

    All, I want to programmatically set the visibility of the plots and tab control pages. The solution I came up with that was to set the visibility property nodes in a case structure and based on the value of the control, many of the plots will be visi

  • What do I do next after the installation of a new processor?

    I have a Compaq Presario CQ5600y PC with an Athlon II170u and I just got a AMD Phenom X 4 9650 2.3 GHz 2 MB Quad-Core CPU CPU HD9650WCJ4BGH Socket AM2 +.  After that I have to remove the old one and put in the new one with the thermal paste, is there

  • WebCenter 12 c ADF UI with HTTP Server

    Hi Experts,when I access the request for the UI of the ADF http://Server/WCC using the HTTP, serverthe mouse cursor changes for download and the interface works is not likely.THX

  • Cannot redownload apps

    So I had to uninstall Acrobat Pro 11 and reinstall for different faults that are produced.I uninstalled the software and went to the Adobe Application Manager to download again and it is still listed as "installed", even if it is not.I need ACR back!