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

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • How do you number pages but start the numbering on the second page, while omitting the page number from the first page (my title page)

    I have recently changed from Word to Pages 5.5. I want to create a document with a title page (no number) and the second page as Page 1. It is quite simple to do in Word, but I cannot find a way to do it in Pages.

    Hi Ryanlipp;
    Insert a section break
    Place cursor in the newly created section (page)
         In the Document panel:
    select Insert page number: 1.
    Under Numbering, select start at: 1
                     It starts numbering from number 1 in the new page (2nd page).
    Now place the cursor in the previous page (Ist page).
    Select Hide on first page section.
                     This hides page number in the first page of the document.
    I hope, this is what you are after.
    Regards,

  • How to open-up a pdf file to a particular page via java? (file and page number from another program)

    I have created an Access 2003 Form. Data is entered. The data can be viewed once entered in the same form format, with one addition. The addition is a link to another program where we store files. The files stored are pdf documents. Each document is a scanned file (500+ pages). The link can open-up the pdf file. I want the link to open-up the pdf file to a particular page. I will supply the page number from the database.
    I am aware of Adobe Acrobat 7.0 PDF Open Parameters using a URL that specifies the file to be opened plus actions to be performed once the file is openend (i.e. http://example.org/doc.pdf#page=3). However, the 3rd party program transfers a file from a server to the client via java. The file does not go via a web browser. The java code transfer the file directly from the file server to the the client.
    Any idea how to accomplish the task of viewing a particular page with the process flow described?
    I am using Adobe Acrobat 7.0 Professional.

    So you are reading this file in a standalone version of Acrobat? If so then use the PDF Open Parameters /a option via the command line.
    Sabian
    Example:
    C:\Program Files\Adobe\Acrobat 7.0\Acrobat>Acrobat.exe /A "zoom=1000=OpenActions" "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\SimpleSubmit.pdf"
    Where:
    Path to Acrobat: C:\Program Files\Adobe\Acrobat 7.0\Acrobat>Acrobat.exe
    Note: The example starts in the Acrobat application directory
    Switch: /A
    Parameter Syntax: "zoom=1000=OpenActions"
    Path to file: "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\SimpleSubmit.pdf"
    Note: The quotes are very important for the syntax to work appropriately.

  • How do I remove the page number from first page?

    I'm new at Ai so this may be basic.  I can't figure out how to eliminate the page number from the first page.  Any help would be appreciated.

    Normally I would have a different master page for the first page, then have no page number on that master page.
    Apply this master to the first page.
    Or you can manually override the frame by holding CTRL SHIFT and clicking on the frame, then delete it.

  • I have a question about extracting pages.  When I do the function, adobe saves the individual files as " file name space page number ", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I a

    I have a question about extracting pages.  When I do the function, adobe saves the individual files as "<file name><space><page number>", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I am using excel to concatenate some data to dynamically build a hyperlink to these extraced files.  It casues me problems, however, for the space to be the the file name.  Is there any way to change the default behavoir of this function to perhaps use a dash or underscore instead of a space?

    No, you can't change the default naming scheme. You can do it yourself if you extract the pages using a script instead of using the built-in command.

  • How to change the page number of the existing PDF during assembling?

    Hi All,
           I am going to assemble two PDF's. Both the PDF's are having page no. So i am assembling two pdf's using invokeDDX method. I am setting page number in the DDX. Assembled PDF is having both the page no's, old page no and the newly generated page no. How to get ride of the old page no? If one PDF is of 2 pages and other PDF is of 3 pages.It should show only 1 of 5,2 of 5,.....5 of 5. It showing this along with 1 of 3,...3 of 3.
    Thanks in  advance.
    Lavanya.

    Hi
    Please declare the line count for report page length.
    When you do not declare it is taken as default 0 and this is dynamic page lenght of SAP ( limit is 60,000 lines).
    Use statement REPORT <rep> LINE-COUNT <length> [(<pf>)].
    Where <length> is line count. Use as per your requirement. <pf> is line reserved for footer if you require.
    Additional you can use LINE-SIZE <width> to determine width of page.
    Please reward if helpful.
    Regards,
    Sunil
    Message was edited by: Sunil Sawaiker

  • When i tap a name in favorites it uses the number from the name below the one i want

    when i tap a name in iphone favorites it uses the number from the name below it

    Try this:
    First, turn FaceTime off in Settings>Phone. Then, delete all of your favorites entries. Next, turn FaceTime back on, then add all of your favorites back.

  • Print by choosing paper source by PDF page size from MAC

    I have an iMAC with Maverick OS.  I am printing to both an HP 401 monochrome laser printer and an HP Laser Jet Pro CM1415fnw Color Printer.  I receive .pdf files which contain both letter and legal sized pages.  I know that I cannot print out letter and legal size pages by selecting "choose paper source by PDF page size" from my MAC.  This does present a problem for me (and I'm sure many others).  What I would like to know is 1) is there a way around this problem and 2) are there any plans for Adobe to address a resolution to this issue by fixing the option so that MAC users can achieve the same level of ease of print results as Window users?  There is certainly a large segment of the population who are now MAC users.  Thank you.

    Thanks for the suggestion, Steve.  I did go to that link and asked the same
    information of Adobe directly.  Their NB at the bottom of the page says
    that due to the large number of questions asked and information requested,
    they usually do NOT respond to the users.  Too bad.  How else are we
    supposed to get valid info?  I believe almost all the other software
    vendors do have a contact location from which they will address user's
    concerns and will contact you with some kind of info.  Welcome to the new
    world of customer service!!  i.e., Go figure it out by yourself!!
    Mitch
    M. Mitchell Gordon
    [personal information removed by moderator]

  • Search rollover page number not consistent with thumb and pdf page number

    Please respond by e-mail to
    [email protected]
    Adobe Reader 9.0 and 8.1.2.
    Mac OS X 10.4.11
    Mac PowerPC G4
    640 MB SDRAM
    Does Adobe Reader have a search window phrase rollover, yellow-highlighted pop up page number bug displaying the wrong page in some circumstances?
    If Yes, how do I report that bug to get Adobe to fix it?
    Viewing the same PDF:
    MacPreview does not have the problem described below,
    Adobe Reader does have the problem.
    Adobe Reader, search phrase rollover, pops up a page number that is yellow-highlighted, e.g., p# 29, and is wrong, whereas the page number for the thumb and PDF are both the same and are correct.
    My PDF has been set on Acrobat Pro to properly paginate the first eight pages in lowercase Roman numerals (i, ii, iii, iv, v, vi, vii, viii) followed by Arabic numerals (1, 2, etc.). My PDF uses an AcrobatPro special setting to properly handle this pagination scheme. The search phrase rollover pops up a yellow-highlighted page number that wrongly adds 8 pages to the page number for the thumb and for the PDF page. Suspiciously, we have 8 pages with lowercase Roman numbers. Remember, viewing the same PDF, MacPreview works perfectly, producing identical and correct page numbers for the phrase, thumb, and PDF.

    the method u followed is fine as need a page number staring from a specify value which u input.
    @section is only for resetting page number to 1 for every group and for that pdf and ppt will be fine but only for rtf u need to use that ( pressing F9).
    u can use @section and initial page number combined but they give u same output as get now. rtf output wont support it will only reset 1 every time
    What ever u do rtf output wont support initial page number code ..........
    i mentioned that F9 work around to mention that it is the only work around u have upto now to control rtf output with regards to page number.
    Guru's correct me if i am wrong. wait for a day or two if some one from guru's confirm it .
    If u need real confirmation raise an SR oracle will let u know .

  • 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

  • AFPPRN received a return code of failure from the OSD routine FDUPRN

    Hi all,
    Operting system : Solaris 9
    Oracle application: 11.5.10
    i would like to ask query related to buffer area of pinter on solaris server.
    we are trying to print cheques using oracle application on network printer.
    some times it is printing the cheques with out any problem but sometimes it throws and error message in concurrent request log file.
    ****************** L O G F I L E C O N T E N T S ***************
    Printing output file.
    Request ID : 849798
    Number of copies : 1
    Printer : radch1
    Pasta: Error: Error reading input file for type checking.
    APP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN. An error occurred while AOL tried to spawn the print process
    Cause: AFPPRN received a return code of failure from the OSD routine FDUPRN. An error occurred while AOL tried to spawn the print process.
    Action: Review your concurrent request log file for more detailed information.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 20-AUG-2009 11:49:18
    ****************** L O G F I L E C O N T E N T S ***************
    my question is
    1) Do we need to delete any temporary files from server related to printer.
    Regards

    Hi,
    What is the status of those concurrent requests (Completed with Warning or with Error)?
    1) Do we need to delete any temporary files from server related to printer.Usually, you do not need to delete any files manually, temp files will be created by the application, and there should no issues with the files permissions (unless you have some other instance running on the same node with different applmgr user). However, you can safely clean (.t and .tmp) files as per the following documents.
    Note: 435437.1 - Most Common Solutions to FRM-41839 and .tmp Files Not Being Deleted
    Note: 145487.1 - Files Types .t and .temp and .tmp, are Saving Under /var/tmp
    Note: 162232.1 - Why Does Oracle Forms Create .TMP Files Which Fill Up The Filesystem e.g. /tmp ?
    I would also suggest you search Metalink for APP-FND-00500 and you will get many hits, go through the documents and see if it helps.
    Regards,
    Hussein

  • How to get the page number in the break section?

    Hi expert,
    The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
    ABC Compnay
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 1
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    BCD Company, p 2
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    CDE Company
    XXXXXXXXXXX XXXXXXXX
    XXXXXXXXXX XXXXXXXXXXXX
    How to get the page number in section break level?

    Hi Wes
    * Create a Field on the margin.
    * Set its "Source" to "Page Number"/"Physical Page Number".
    * Click "Page Numbering" button.
    * In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
    This should cause Reports to increment the page number until the "Company" repeating frame resets.
    Regards
    Sripathy

  • How to clear the page number in the Script

    Hi Guys,
    I have developed a Script, the same output I need to display with three times with different heading, right now I am able to display the three time with different heading, but the pages are displaying like 1,2,3,4,5,6.
    I need to display the page number 1,2,1,2,1,2, once the heading changes, I need to display page number from I, but I could not able to clear the Page number, could any one please suggest how to create the page number in LAYOUT.
    Thanks,
    Gourisankar.

    Sloved

Maybe you are looking for

  • Not able to hide all fields on PNP selection screen.

    Dear Freinds,            i wanted to hide all the field which are given on PNP selection screen, with the help of the report category i have hided all the field including the Person selection period  as i require only the Data selection period.  furt

  • Image creation from Swing Frame

    Hello friends, I have created a Swing application which depicts a Invoice form in any normal business. The issue is that when I click save button, the screen details captured in components such as textfields,combos etc..should get saved in DB (which

  • Regarding ORA-01102 ORACLE COULD NOT MOUNT DATABASE IN EXCLUSIVE MODE.

    Hellow Friends, I was testing my recovery strategy for control file. Out of two my control files I deleted one and tried to start when oracle gave me error that could not find so and so file in such and such location. I than copied first member which

  • Question on BIEE Answers

    Hi Experts, I am trying to build data in the physical layer, business model and mapping as well as presentation layer in BIEE 11g. Now, I have 3 relational tables like this, 1. Account (Parent, Child) 2. Year (Parent, Child) 3. Data (Account, Year, A

  • Window placement at run time

    Hi all, I'm a recent convert to the Mac and really love it, but something I miss is the ability to set the position of an application window when started; they always start in the top left; but I would like to be able to control where they start/open