How can I get the page where a page item is localized?

Hi<br /><br />I move some page items to the next spread using kMoveToSpreadCmdBoss. This works fine. But when I want to get the page uid where the page item is localized now (I use Utils<ILayoutUtils>()->GetOwnerPageUID to do that) I get the uid of the spread and not the uid of the page where the page item is localized.<br /><br />- What is wrong?<br />- What can I do to get the page uid?<br /><br />Thanks<br />Hans

Hans,<br /><br />I recently had to do the same, so I'll show you what I have done.  I start by getting the spline item UIDRef and the value that Utils<ILayoutUtils>()->GetOwnerPageUID gives you.  Then I figure out which side of the spread the item falls on:<br /><br />InterfacePtr<IGeometry> splineGeo(ItemRef, IID_IGEOMETRY);<br /><br />PMRect itemRect = splineGeo->GetStrokeBoundingBox();<br /><br />PMPoint currPoint = itemRect.LeftTop();<br /><br />InnerToPasteboard(splineGeo, &currPoint);<br />     <br />if(currPoint.X() < 0){<br />     //it's a left-hand page<br />     left = true;<br />}<br /><br />Once I know which side the item is on, I can calculate which page the item falls on(where OwnerUID is the UID that the call to GetOwnerPageUID returns):<br /><br />UID GetOwningPageUID(IDocument *docPtr, UID OwnerUID, bool left)<br />{<br />        UID rc;<br />     int32 index;<br />     <br />     //get the database <br />     IDataBase *db = ::GetDataBase(docPtr);<br /><br />     //Get the list of pages<br />     InterfacePtr<IPageList> pgList(docPtr, IID_IPAGELIST);<br /><br />     index = pgList->GetPageIndex(OwnerUID);<br /><br />     if(index >= 0){<br />          //the passed in UID refers to a page<br />                rc = OwnerUID;<br />     }else{<br />                //dealing with a spread UID<br />          UIDRef pageSpreadUIDRef(db, OwnerUID);<br /><br />          InterfacePtr<ISpread> pgSpread(pageSpreadUIDRef, UseDefaultIID());<br /><br />          int32 pageCount = pgSpread->GetNumPages();<br /><br />          if(pageCount == 1){<br />               rc = pgSpread->GetNthPageUID(0);<br />          }else if(pageCount <= 2){<br />               if(left){<br />                    rc = pgSpread->GetNthPageUID(0);<br />               }else{<br />                    rc = pgSpread->GetNthPageUID(1);<br />               }<br />          }else{<br />                     rc = nil;<br />          }<br />     }<br /><br />     return rc;<br />}<br /><br />I hope this helps.<br /><br />Dan

Similar Messages

  • How can I get the page to curl when turning to the next page in iBooks author?

    How can I get the page to curl when turning to the next page in iBooks author?

    I don't think you can. If you need that effect, you should use ePub (that can be authored via Pages) not iBA.
    I hope Apple give us the option in the future though.

  • How can I get the page loading in progress indicator visible as in 3.6??

    1)
    When a page takes long to load it would be nice to see its progress, if any, as I used to have in the earlier 'FF-version. Is it possible somehow?
    2)
    If I choose "no tabs" to save space on screen can I get the tabs visible when needed, without going to preferences?

    1. https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    2. That pref suppresses the Tab bar when there is only one Tab open. With two or more Tabs Firefox should always show the Tab bar. ''Unless you are referring to a preference added to Firefox by an add-on.''

  • How Can I Get The Table_Name Where I Used Dbms_Errlog?

    CREATE TABLE ERROR_LOG
    ORA_ERR_NUMBER$      NUMBER,
    ORA_ERR_MESG$           VARCHAR2(2000 CHAR),
    ORA_ERR_ROWID$      UROWID(4000),
    ORA_ERR_OPTYP$      VARCHAR2(2 CHAR),
    ORA_ERR_TAG$           VARCHAR2(2000 CHAR),
    ORA_ERR_TABLE_NAME      VARCHAR2(30),
    ORA_ERR_TIME           DATE     DEFAULT SYSDATE,
    ORA_ERR_AUTHOR     VARCHAR2(30)     DEFAULT USER     
    I create a single table for handling errors for all tables.
    I just want to Get the table name where I used dbms_errlog.
    I want to get table_name where I performed last DML Statemet?
    Edited by: Nilesh Hole on May 24, 2010 4:50 AM
    Edited by: Nilesh Hole on May 24, 2010 4:57 AM
    Edited by: Nilesh Hole on May 26, 2010 3:43 AM

    I should have written "you should not" rather than "can not." The advice holds.
    The point of using the package in its default mode is that you can fix the problems.
    Do it generically and all you learn is that an error occurred.
    SQL> select * from ERROR_LOG_SERVERS;
    ORA_ERR_NUMBER$ ORA_ERR_MESG$                                      ORA_ERR_ROWID$     OR ORA_ERR_TA
                  1 ORA-00001: unique constraint (UWCLASS.PK_SERVERS)                     I
                    violatednot much useful information.
    But I appreciate you posting the idea so I show on my website why doing this is a bad idea.

  • How can I get the page status light to come on?

    The page status indicator light ha been non-functional ever since I downloaded newer versions... as a result of this problem I have seldom been using Mozilla firefox because I have no confidence in secure searching! If need be, I will delete Mozilla Firefox altogether!

    When you had to reset and secure the router that provides the wireless network, does this mean that you changed either the wireless security setting or wireless network password?
    If yes, then you will need to reconfigure the AirPort Express and provide it with those new settings so that it can join the wireless network correctly.

  • How can I get the name of an Array Item in LabVIEW

    Hi,
    I would need to display the name of the items in the Step.Result.Measurement array in a VI. I can access these properties using the index, but I don't know how to get the name of them like Step.Result.Measurement[0] .
    Is there any suggestions to do it in an elegant way?
    Andras

    Hi Andras,
    look here.
    Regards, Guenter

  • How can I get the pages to fit in the screen so I don't have to scroll sideways on every line?

    I'm using WindowsXP and I recently downloaded Firefox 3.6.8, and now almost everything I view has to be scrolled sideways to be read. I'm not particularly computer savvy, but I was able to figure it out on the other browsers I've used. I've tried a lot of things, nothing has worked, and I'm getting so frustrated that I'm considering going back to one of the other browsers, even though in every other I greatly prefer Firefox. Please help! Thanks.

    Is the zoom set to 100% or smaller? (View menu, Zoom)
    If you right-click the shortcut you use the start Firefox, then choose Properties and click the Compatibility tab, is anything checked there?

  • CS3: Table on more than one page - How can I get the UIDRef's of the pages?

    Hi
    I have a table over more than one page. How can I get all UIDRef's of the pages who contain parts of the table?
    Thanks
    Hans

    Hi
    Thanks for the answer.
    - How can I get all page items of a table?
    - One other question: If I have a table over two pages (side by side) there is only one page item of the table. Right? How can I get the two pages (UIDRef) in that case?
    Thanks
    Hans

  • How do I get the page on the screen larger and to stay larger all the time?

    my pages on my screen were large; all of a sudden the pages are display smaller on the middle of the screen. I can zoom a particular, but I have to zoom each time I go to another website or another page. How can I get the page to display larger without having to zoom each page displayed on the screen?
    == This happened ==
    Every time Firefox opened
    == After i downloaded updates to Adobe Reader 9.

    Reset the page zoom on pages that cause problems: '''View > Zoom > Reset''' (Ctrl+0 (zero); Cmd+0 on Mac)
    See [[Text Zoom]] and [[Page Zoom]] and http://kb.mozillazine.org/Zoom_text_of_web_pages
    If you need to adjust the font size on websites then look at:
    Default FullZoom Level - https://addons.mozilla.org/firefox/addon/6965
    NoSquint - https://addons.mozilla.org/firefox/addon/2592

  • Teststand 1.03 - How can I get the sequence file path into an expression?

    The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
    Thanks

    As Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.
    If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
    Attachments:
    GetSeqFilePath.seq ‏22 KB

  • When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it

    When I select a title in the iTunes Store and click on Play in iTunes I am sent to the download page for iTunes 10 which I have already. The selected title cannot be found anywhere in my iTunes. How can I get the title in iTunes with possibility to buy it?

    The issue is that your credit or debit card credentials must be associated with the same country where you reside in order to purchase iTunes content.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location. You can use the iTunes Store in all countries of which you’re a resident, but you’ll either need a separate iTunes Store account for each one, or you’ll need to continually be switching the billing information on your single account. Generally, it’s simpler just to set up an alternative account for these situations, although it’s worth nothing that features like iTunes in the CLoud and iTunes Match are designed to work best when using a single iTunes Store account, as you can only switch accounts with these services every 90 days."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • How can I get the iBook app on my Mac to backup ePubs I created with Pages on my iPad? Only seems to want to work with purchased from the ibook store.

    How can I get the iBook app on my Mac to backup ePubs I created with Pages on my iPad? Only seems to want to work with purchased books from the ibook store. The problem is, once I create a document in Pages and turn it into an ePub to be opened in iBooks, I delete the document in Pages, because I don't need two copies taking up space on my iPad. Before Maverick, iTunes would backup everything in my iBook app on my iPad. If something ever happened to my iPad, all of my created ePubs would be lost and I would be screwed. I suppose I could keep everything on Pages and go to iCloud and download my documents to my Mac, but that is a lot of steps. I may have to do that if there is no other way, but I am hoping someone will have the answer for me. Pretty disappointed in iBooks app for Mac at this point.

    iBooks only syncs purchased books. Others must be synced in iTunes.

  • Only the first page is printed reduced as setup. All pages afterward are full size with information cut off. Recent problem. Can print from Safari just fine. How can I get all pages to be reduced size?

    Question
    Printing internet pages
    Reduced print size
    Only the first page is reduced and printed as desired
    All pages after the first page are full size with information cut off
    Recent problem never seen before
    Can print from Safari and other software just fine
    How can I get all pages to be reduced size?

    One suggestion worked from the Firefox prints incorrectly link mentioned above by mha007. I'm thrilled since this has been annoying me for weeks. Thanks mha007!
    Reset all Firefox printer settings
    # Open your profile folder:
    # On the menu bar, click on the Help menu and select Troubleshooting Information. The Troubleshooting Information tab will open.
    # Under the Application Basics section, click on Show in Finder. A window with your profile folder will open.
    # Note: If you are unable to open or use Firefox, follow the instructions in Finding your profile without opening Firefox.
    # On the menu bar, click on the Firefox menu and select Quit Firefox.
    # In your profile folder, copy the prefs.js file to another folder to make a backup of it.
    # Open the original prefs.js file in a text editor (such as TextEdit).
    # Remove all lines in prefs.js that start with print. and save the file.
    # If something goes wrong when you open Firefox, close it again and overwrite prefs.js with the backup you made.

  • How can I get the tabs back where they belong beneath the address bar , NOT on top ???

    how can I get the tabs back where they belong beneath the address bar , NOT on top ???
    they are on top, which puts the address bar at a variable position depending on how many tab rows exist - makes a moving target for navigating to across my dual 24 inch screens
    I tried your "solution" using about:config and setting browser.tab.on.top or whatever to false, but that had NO effect
    Maybe because TabMixPlus is installed?
    It does allow putting the tabs all the way at the bottom, but I don't like that either.
    PLEASE, give me the address bar at TOP with tabs under that!!!
    Also, I don't want FlashGot to be at the right of the address bar!!!

    why should we use yet another add on to get the tabs back at the bottom? Big mistake.
    Moreover, why make FF look more like Chrome? If I wanted Chrome, i would have installed it long time ago.
    FF 29.0 is NOT an improvement.
    Nasty piece of mud.

  • When I open a new tab, how can I get the second tab to be me my home page also?

    I know how to right click and open a new tab when I am browsing but if I want to open just a blank new tab, how can I get the second tab to be my home page also?

    I know how to right click and open a new tab when I am browsing but if I want to open just a blank new tab, how can I get the second tab to be my home page also?

Maybe you are looking for