Page number of linked textframe in indesign document

Hi,
  My indesign document has linked pages 1 - 10 (ie., linked textframes).  I want to take page number of selected text from 5th page., which textframe is linked textframe of 1st page.  When i use the following code for findpage, its returning the page no 1 instead of 5. 
Kindly reply for me...
var page = findPage(app.selection[0]);    // selection is a word/para
function findPage(theObj)
    var thePage = theObj;
    if (thePage.hasOwnProperty("baseline"))
        thePage = thePage.parentTextFrames[0];
    while (thePage.constructor.name != "Page")
        var whatIsIt = thePage.constructor.name;
        switch (whatIsIt)
            case "Story" :
                thePage = thePage.textFrames[-1].parent;
                break;
            case  "Character" :
                thePage = thePage.parentTextFrames[0];
                break;
            case "Cell" :
                if ( thePage.insertionPoints[0].parentTextFrames[0] == null)
                    // contents of cell is overset
                    thePage = tryHarderForCell(thePage);
                    if (thePage == null) return null;
                    break;
                else
                    thePage = thePage.insertionPoints[0].parentTextFrames[0];
                    break;
            case "Application" :
            return null;
        thePage = thePage.parent;
    return thePage ;

Hi,
  Thank u... Its working...

Similar Messages

  • Will pages automatically reformat to correct size when using Folio Builder or do I have to make pages iPad format, for example, in InDesign document set up from the start?

    Will pages automatically reformat to correct size when using Folio Builder or do I have to make pages iPad format, for example, in InDesign document set up from the start?

    Moved to DPS forum.
    You need to set up the pages appropriately for the target device. For iPad that's 1024x768.

  • Maximum number of pages and links in an InDesign Document

    We have an InDesign document that is 79 pages, and contains about 700 image links and 700 text links. The links in total are about 7GB (most text documents are 2-6K; images could be anywhere from 1 to 50MB). the InDesign document is 220MB.
    If we house the package of the InDesign Document and the links on a local machine, it takes our machine about 2 minutes to load the file for editing. If the packaged is housed on a NAS drive (BUFFALO TERASTATION using Gigabit), it takes 16 minutes to load.
    I'm wondering if there is a set of "best practices" that suggests a limit to the size of the package, and if you exceed that limit, you should expect poor performance? (Like should we limit our documents to 10 pages and 1GB of links?)
    Are we asking for trouble by having documents and links this large? or is there some network or settings or performance issues on our network and on our MACs that I should be looking at first?
    Thanks for any comments or assistance.

    To answer in a simpler way:
    Page number limit per document: 9999 pages
    Link limit: your computer configuration (processor, ram, etc) determines it.
    Remember, if u run very large documents, you need to upgrade your configuration accordly. If you not have enough available resources to run a job fast, its clear the computer/network needs an upgrade. There are models of HP computers that can reach 128gb of ram memory, and they are not server, they are workstations.
    the other way is to avoid extra image data on links (large images in size, far from the output size) and work with the exact size you need, because this extra size can be the cause of the extra processing time.
    "We "strive" to do the editing in PS, but often we have a PS file that we want to keep at 4x4 (for future or other purposes), but will place it in InDesign as 2x2 -- so we edit it in InDesign. Should we be creating a new 2x2 file for this one-time purpose?"
    Thats the idea, (extra size = extra processing = extra time) X number of you images.

  • Is there a limit to number of hyperlinks in an InDesign document?

    Anyone know if there is a limit to the number of hyperlinks that can be used in an InDesign document that is to be exported as an interactive PDF?
    Looking to include up to 500 or so links to different URLs and would like to know if there is a limit before I start rather than hit it half way through!
    Many thanks for any help.

    Yup... you can have up to 99 tracks, including stories and slideshows in that number.
    However, there is really no reason to have one clip per track... you could put several (or all 80) into a single track if needs be.

  • Need to re-Link every Link in every InDesign document we own...

    We keep all of our common files up on a server so that everyone in our department has access to everything at all times.
    Our IT department has decided to migrate all of the Marketing Assets over to another server so every link in every InDesign file we have access to has to be re-Linked.  The path for the most part will remain the same, just the root directory will change...
    For example, where a file used to be located in
    \\clients\marketing\common\logos\logo.eps
    it will now be located in
    \\newserver\marketing\common\logos\logo.eps
    Is there any fast way to batch change all the links in every InDesign File?  Is there a script out there that can help us or a third-party software that we can get our hands on to help us?  This will take forever if we have to do it manually.
    If anyone can help, we would appreciate it.
    Thank you.

    Here's a few ways I can think of:
    You could, of course, just leave it to each operator to resolve the links every time a file is opened for the first time since the server migration.
    You could also write/have written a script which would process folders full of InDesign files at some down time (e.g., over night) - opening each one, resolving links, and then saving it.
    Or, if you are using InDesign CS3 or CS4, you could write/have written a script that would be attached to the document "Open" event to do that same thing. This would basically automate the idea #1.

  • Generalizing the return page number when linking to a page in another app

    Hello.
    I know how to link to a page in another app within the same workspace. However, my problem arises when the user tries to go back to the page in the first app.
    Is there a way to "generalize" the "return path". I do not want to hard-code the return page number within a "back link" element on the target page. I was wondering if there is some sort of substitution string I can use in the return http address that automatically "knows" what the returning page number is. Hope I'm making sense here.
    Thanks for any help/advice.

    Funky:
    I have tried some work but no success
    I don't know what you are asking of me. I have given detailed step-by-step instructions on how to implement what I suggested earlier on in this thread. Look at my postings on 9/13/2006. What part are you having trouble with?
    Could you be more specific?
    I'm afraid I am going to have to ask you the same question.
    if page is not submited (called through Tab)
    Apex standard tabs do submit the page and fire after-submit computations defined on the calling page before branching to the "current" page for the tab you click on.

  • Hyper links to another indesign document

    Hi everyone I am currently working on a mobile app and I  have a slight problem
    So I have 2 sperate in design docs and i created a frame and convert it to a button.
    What I wanted to do is place hyperlink on the button on one doc to goto next indesign doc.
    when I use the hyperlink and select page browse to the doc it accepts it but when I test it it does not work.
    I checked the crosslink on the button in which it goes to the doc I want but its not working when I test it to my iphone
    I can see it bit not working.

    I'd like to expand the original question. The "navto://articlename method" worked for me. I can jump to another artical by making a button and adding a hyperlink to go to it. IT takes it to the first page. Here's my question: What if I have an artical that has multible pages and I what to target a particulur page or asset on that page. Lets say I want it to go to page 4 in that artical? I can't find a tutoral to show me howit's done.

  • Is it possible to place an InDesign page into the same InDesign document

    I'm able to place an InDesign page into another InDesign document, but am not able to place an InDesign page an InDesign document when the page is part of the same InDesign document. Is there any way around this limitation?

    PDF is the better bet (although you might as well save a copy of your document). Snippets have all kinds of problems for this because of master items and the fact that from a script you can only export individual items as snippets (although you can group them and export that).
    Dave

  • Error with master page "insert current page number" when exporting book

    Using InDesign CS 5.5 for Windows
    Recently upgraded from InDesign CS (the really old one from 2003). I did save a copy of all my old version files and kept the old ID installed just in case (after reading all the horror stories on here).
    In my old version of ID, I created a book made up of about 70 documents. Some of these documents are one page, others have multiple pages. In the multiple page documents, I used the "insert ... current page number" character (or whatever the command was in the old version) on a master page, and formatted it to read, for example: Page 1 of 17, Page 2 of 17, Page 3 of 17, etc. When I exported my book to a pdf, it worked fine. (I do not want/have consecutive page numbers throughout the book, only in individual documents. By this I mean my entire book is about 280 pages, but not all of these 280 pages are numbered, just the groups of pages from these multi-page documents. It doesn't read page 1 through 280.)
    Got my upgrade to 5.5 a few months ago, added some documents to the book, and (if i remember right) when I saved the book it asked to convert every old version document to the new version, which I said okay. When I exported the book to a pdf, some documents that are longer than 2 pages are now numbered wrong; the numbers are now going like this: Page 1 of 17, Page 2 of 17, Page 2 of 17 (supposed to be page 3), Page 2 of 17 (supposed to be page 4), etc. Every page but page 1 is now page 2 of whatever.
    If I open the individual document and export it to pdf, the page numbers work fine. It's only when the document is exported with the book that the page numbers mess up. And it's not all the documents in my book; this error starts at a particular document and continues from that point throughout the rest of the book, affecting any document longer than 2 pages. Multi-page documents before this point in the book export with the correct page numbers.
    I create new documents by doing a "save as" with a previously created document and cut and paste as needed, so I'm not having to reformat or set up page numbers on each new document. I don't use layers or styles (I'm sure there's a better way to do what I need, but I've only had time learn the basics, just enough to be functional.)
    My attempts to fix this so far (using version 5.5), testing with the first document where the error appears: (1) I've removed the document from the book, deleted the insert current page number character, re-entered the insert current page number character, saved, exported the individual document to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (2) I took the document out of the book again, exported the document to .idml, saved as new .indd with new name, exported to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (3) I started up my old ID version, opened the old version of this document, exported to .inx, closed, opened .inx in ID 5.5, saved as new .indd with new name, exported to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (4) I moved the document up in the book order, putting it above a document that has correctly numbered pages, saved, exported to pdf, and this document was still wrong, but the one that has been numbered correctly all along is still correct. (5) I've compared settings for this document to others that number correctly and cannot find any difference.
    It's like the page numbers get hung on "2" when I export the book, but only in the last two-thirds of the book. Sorry it's so lengthy, but I hope this description of my problem is understandable. Any advice, other than going back to my old version documents and starting over?
    Thanks for your time and for all the awesome information this forum provides!
    alice

    Mr. Spier
    Right after I posted my question, I saw a post from last year where somebody had similar problems. (I cringed because I spent almost 3 days researching this problem and never ran across that post; thanks for not scolding me for posting a semi re-run.) I decided to try one of the easier solutions: I opened the problem document from the book panel, went to the master page and deleted the text box containing the page number, copied the page number box from a document that worked correctly, and pasted it into the problem document. Saved that doc, closed, saved book, exported to pdf, and it worked!! The page number problem was fixed. I went back and did the same thing for the other problem documents and they all number correctly now. 
    Probably not the best way, but for now this will fix it; I may have to do it again next time I add to the book. Although I didn't follow your instructions, I'll mark this as answered since it's working now. If it keeps giving me problems, I'll try the .inx export/new book route.
    thanks for your time
    alice

  • Exporting to SWF - interactive indesign documents

    Hi guys,
    Ok so I have been playing around again with the idea of producing some interactive wire frames using indesign and exporting to swf. I have a global nav at the top that is working just fine. I also have some links futher down the page, and that's where the problem is.
    Let's say I have a link called 'Map' half way down the page. It's a long page around 4000 px. So let's say the 'Map' link 2000 px down the page. When I click on the link it takes be to the map page, but postions me at 2000 pixles down the page. Not at the top of the page where I want to be.
    I have had a play around with the Zoom drop down but I am not having any success.
    I don't want to export to pdf as I want to be able to set target pages for the links with in indesign, and not have to mess around in acrobat after (potentialy This document will have a tonne of pages).
    Anyone got any ideas (please)
    Dan

    Hello, thank you. I have chosen flash text.  Which has sorted the fuzzyness...so big tha
    nk you.  !!  The text has now converted to times new roman?
    ..any suggestions as to how i keep the text chosen when working in indesign file?
    Sorry..im a newbie!

  • Dynamic page number references?

    Is there a way to have page number references dynamic, so that they automatically update if the pagination of a publication changes?
    I've read about generating a dynamic table of contents, so I will be doing that certainly.
    But what about page references that fall outside the TOC? For example, let's say there's a parenthetical reference in the text of a publication that says something like "see page 45 for details on XYZ." Can the page number here be somehow linked to its referent? Is there some way to tag an element (a heading, for example, or a text selection, or a frame containing a graphic) and then have a page number reference linked to that tag?
    Sort of like how anchors work on the web.
    Thanks.

    Great, thanks.
    p.s. I just did a search of the forum for "cross references" and the only result I got was this thread! Odd.
    I notice from the InDesign help documentation that cross references seem to be for indexing. Not sure if that applies to my situation--for example, if you mention a particular sidebar later on in the text and want to refer the reader back to that sidebar...how would you reference the sidebar dynamically so when it changes location, the page number reference changes accordingly?

  • Showing indesign document in iOS app.

    Hi, I want to create iOS app which will display magazines but other then magazine pages i want to create login and some other pages. How can i show indesign document in app? DPS don't allows us to code and I haven't found any satisfactory answer for using indesign document in coding through xcode.

    AFAIK InDesign SDK is meant for creating plug-ins for InDesign. It has nothing to do with cXode or even objective-C programming language which is used in xCode...
    InDesign documents (indd-files) are compiled binary files, I don´t think you can parse them anyhow.
    InDesign can be set to save preview images of the pages, that can be used for showing InDesign document´s pages inside some iOS viewer app, I think someone has already done somthing like that... but that´s about only way I can imagine to show InDesign document´s content inside iOS app...

  • Remove page number from PALT text

    Hi,
    I'm using transaction SO10 to create a PALT text (Applicant correspondence) and I would like to remove the page number of the header of the document. Do you have any idea of how to do it?
    Thanks,
    MForman

    Goto SE71-> Utilities-> Copy from client->Give form name-SYSTEM, source client-000, target form ZSYSTEM than the form ZSYSTEM will create.
    Again goto SE71 -> ZSYSTEM->change->goto header window, remove the page on the window text element.
    Now goto SO10 give the standard text name and change -> goto Format->change form-> Assign ZSYSTEM.
    Now your problem will resolve.
    Every form related thing you need paragraph format, character format and layout.
    For SAP-script there in build paragraph format and character format and for smartforms we need to create styles otherwise default style will assign.
    For SAP standard texts you need to create both in different way i.e sap-sctipt style and sap-script form assign both to in SAP standard text
    Thanks
    Chinni
    Edited by: Tirumula Rao Chinni on Mar 9, 2010 9:56 AM

  • Return PDF page number from the name of the link in InDesign CS4 JS

    Hi, I need to return pdf page number of the linked file in InDesign.Here what I have so far, but my FilePath comes back undefined, and I am not sure if pageNmuber line would work:
        var myArtBack = app.activeDocument.pages[1].rectangles[0].graphics[0];
        var myArtBackName = myArtBack.itemLink.name;
        var myBackFilePath = myArtBackName.filePath;
        var myPageNumber  = myBackFilePath.PDFAttribute.pageNumber;
    Your help is highly appreciated.
    Yulia

    Your first problem is:
    var myBackFilePath = myArtBackName.filePath;
    That should be:
    var myBackFilePath = myArtBack.itemLink.filePath;
    What you should have done is something like:
    var myLink = myArtBack.itemLink;
    var myPageNumber = myLink.parent.pdfAttributes.pageNumber;
    Maybe you need the file path for some other purpose, but that's not the route to information about the PDF graphic (the parent of the link) which has the pdfAttributes property -- property names always start with a lowercase letter.
    Dave

  • Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    You should ask in InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

Maybe you are looking for

  • Store and display other language

    hi friends database - 11g apex - 4.1 i have form based on table. i want to display and store language "gujarati" in database. How it possible?? Thanks

  • Images disappearence in latest build

    Hi, I've integrated the new Gumbo build 4.0.0.4904 (with TLF build 357), but there seems to be issue with images. Problem is that of image disappearance. After adding image, type some text and then click mouse close to image, results sometimes in ima

  • Is this a good workflow?

    I have to transfer a significant number of miniDV tapes to DVD at the best possible quality. After testing a few alternatives, I settled for the following workflow, however it takes a long time to process each tape therefore I wonder if anyone has an

  • Creating package inJdeveloper

    I have created some classes under new directory. So these classes do belong to new package. I see all these classes on the JDeveloper workspace. at the bottom of all the other packages. but under no package. How do I see the new package in the worksp

  • Win 7, 64 bit USB connection problems

    I'm having real problems getting my Touch to reliably connect with my new Win 7, 64 bit Dell laptop. Dell tech support says the drivers and hardware are fine. Following the troubleshooting via Apple support hasn't solved the problem. The Touch times