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.

Similar Messages

  • How to get multiple values from the db using select

    hi all,
    i am using oracle 9i database
    i created a procedure
    create or replace procedure sample_proce
    as
    to_i varchar2(50)
    begin
    select to_id into to_i from sample where flag in('y');
    dbms_output.put_line('hai'|| to_i);
    end;
    when i executed this procedure the following error occurred.
    error at line 5 fetching too many rows.
    but when i execute the select query alone i can able to view all the rows.
    how to resolve it

    i used the following procedure
    create or replace procedure sample_proc
    as
    begin
    for s in(select to_id from sample where flag='y')
    loop
    dbms_output.put_line(s.to_id);
    end loop.
    end;
    it is executed fine. i can able to fetch all the rows.
    how to pass all these values into the another procedure.
    we usually pass only one value into another procedure, i do no how to pass all the values . please help me.
    Thank u.

  • 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 to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • I am using the window xp and firefox 6. I see many videos on youtube. How I get that videos from the catch folder and where is it?

    I am using the window xp and firefox 6.
    I watch the youtube videos online.
    How I get that video from the catch folder and where that catch folder are situated in the window xp.

    ''How can I view or retrieve a video from Firefox's cache''
    To actually view/retrieve the file from the cache and its web address you can use
    the "Cache Viewer" extension 32.8KB
    * https://addons.mozilla.org/firefox/addon/cacheviewer/
    * http://dmcritchie.mvps.org/firefox/firefox.htm#cacheviewer
    For you to be able to view the cached file you would have had to have watched the entire file.
    The latest version of the extension is 0.7b available in all versions you would have to override compatibility by any of these methods
    * checking or pick up one of the xpi versions in the reader comments for Firefox 6.0
    * extensions.checkCompatibility.6.0 set to False
    *: http://kb.mozillazine.org/Extensions.checkCompatibility
    * or with an extension "Add-on Compatibility Reporter" (84.0 KB) seems preferred in this group
    *:https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    There are also extensions such as Video downloader 132.8 KB
    * Download YouTube Videos + Flash Video Downloader / Download-Helper
    *:https://addons.mozilla.org/firefox/addon/download-youtube-videos/
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem after you've tried several things.</small>

  • Restored my 4S. How to get pictures back from the cloud?

    Background: I had a 3GS and on launchday of the 4S I picked one up. A white 32GB on AT&T to be exact.
    I had been having some issues with the battery, so today I figured I'd try and start fresh. Well, I backed up everything on the cloud, and I also backed up everything onto the computer in iTunes when I did the restore.
    I've got my music back. Cool.
    I've got my apps back. Great.
    I can't seem to figure out how to get my photos from the camera roll back. Nor do I know how or if it is even possible to get the photos and my old text messages back on this new restore. Also, none of my mail is coming back either.
    I can see my most recent backup in the iphone settings under iCloud. And I can also see my most recent computer backup on the computer. But I'm not sure what I need to do.
    Any help would be great. Thanks.

    OK - understood.
    There are a couple of ways of going about this. First, my recommended method:
    Restore from a backup (so your photos, SMS etc are on the phone
    Connect to iTunes
    Set the phone to sync photos to a relevant app on your desktop (what app depends whether you're Windows or Mac) - this gets your pics onto the desktop and safe.
    If you want to save SMS, use PhoneView (Mac) or TouchCopy (Windows) or similar to copy them off the phone
    Restore the phone as a new device
    Get the photos back the way you got music etc back - via iTunes sync
    The second method entails using one of the utuilities around the place that can extract from the backup - I have no experience with them, so I don't know how well they work. That's why I go for the first method - simpler, more robust.
    By the way, I came across this other method for SMS:
    http://hints.macworld.com/article.php?story=20090624022758268
    Hope this helps

  • How to hide page number in the table of content

    Hi,
    I'd like to know how to hide page number in the ToC. They show automatically, but at least for the headings of third ad fourth order I'd like to suppress/omit them.
    Thanks for any advice!

    You have in the Inpspector > Document tab > TOC > uncheck button for #'s

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

  • How to download a file from the internet using terminal

    how to download a file from the internet using terminal
    does any one know how to download afile from the internet using the Terminal application?

    Use curl. Something like this:
    curl -O http://www.example.com/filename.zip
    For more info, type +man curl+.

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

    This is only possible with LiveCycle Designer forms, not PDF forms created
    in Acrobat.

  • 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,

  • 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

  • How to remove html tags from the pdf file ?

    Hello,
    Using BI publisher we are generating a pdf file. In the table, we have data which contains html tags. for example " test1<br> 2.test2<br> 3.test3<br> ".
    In the pdf file we need to get the output like this
    test1
    test2
    test3
    But the output is as follows :"test1<br> 2.test<br> 3.test3<br> "
    Any idea, how these html tags can be removed from the pdf file and obtain the required result?
    Thanks in advance!!
    Archana

    Archana,
    Can you wrap your code in <code> tags (use square brackets rather than angled ones), as the forum software is interpretting the HTML tags, in other words we can't see what you mean ;)
    In any case, there are a few different options (guessing at what your problem is, without seeing the actual data), you could use htf.escape_sc or replace, regexp_replace etc to substitute the values before you output them to your PDF.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Get page number from adobe reader activex control

    I used adobe reader activex contol in my application, I wanna access currect page number of open pdf, for that I require AcroExch.App.Avpageview. where we can get it and what would be the cost of it.Or any othe solution for access the page number of pdf.

    This is an interface supplied by Adobe Acrobat, Standard or Professional. (Note that EACH user will need to buy a copy). (And note that you cannot mix interfaces, so you won't be able to use this while displaying in the control).

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

Maybe you are looking for