How to get the page numbers of a word/mpp/execl doc using Java?

Hi,
I meet a problem in Java programming. I want to get the page numbers of a Word/MPP/EXECL/PDF document. For exmaple, if a PDF docment have 10 pages, I need get the 10 . How to get it using Java?
Please advise me as soon as possible if you have any good suggestions! Thanks!
Yin

There are several good tools that allow you to access COM objects from Java. Here are two of the better ones:
Bridge2Java
http://www.alphaworks.ibm.com/tech/bridge2java
J-Integra
http://www.linar.com/
Both of these tools will allow you to access MS Office products (including Word and Excel) via COM interfaces.

Similar Messages

  • How to get the page numbers in the PrintAdvance Data grid without using Vbox/Vgroup header or footer

    hi
    I want to print the page numbers for the data in Advance Data grid, For printing I am using print advance data grid , but unable to print the page numbers with that.
    actually i tried with Vbox/Vgroup, but when tha data is more because of this it is strucking, and more over imageRenderer in the PrintAdvancedataGrid not printing.
    can any one help in this regard?

    Image Caches hold images you've already loaded so the next time you request them, they can be made available without network latency.  This assume for your DG, that all images you need to print have been loaded by, for example, whatever DG the user was looking at before hitting Print.  This is easy when there are only a few icons used to show status, but won't work if each row has a different image unless you've somehow loaded up all of those images beforehand.
    Spark BitmapImage has an Image cache, but some third party ones are discussed here:
    http://thanksmister.com/2009/01/18/superimage-redux/
    -Alex

  • 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

  • My InDesign document has two page 1s and I can't get the page numbers to work.  Help!

    My InDesign document has two page 1s and I can't get the page numbers to work.  Help!  How do I fix this?

    Do you mean the first section is starting at page one?
    And the second one now is starting at page two?
    So I would ask why you would need sections at all?
    Did you set the controls for Automatic Page Numbering?
    If you select the particular page where section two is starting in the Pages Panel, you could untick the Start Section option in the numbering and section dialog. That would remove the section. You cannot do that with the very first section, but you should set the first section to Automatic Page Numbering if you ever want to use your document with an inDesign book file.
    Uwe

  • I can't get the page numbers in my table of contents to update when I update the book.

    I'm using Framemaker 11 and I have two TOCs in my book: one in English and one in French. Each TOC links to different documents in the same book. The reference page for each TOC is set and correctly displays the heading 1 and 2 I've told it to display, but the numbers do not update when the content in my document files changes to a different page. I've checked the conditional text settings in my document files; they are correct. When I update the book, I choose to update Numbering, All Cross-References, All Text Insets, OLE Links, Generate Table of Contents, Lists, and Indexes. What am I doing wrong? Thanks.

    I just tested this out and saw the same result as Rick - a book with child books ignores all generated files within the child books. This applies to adding content from them (e.g. their titles) to actually including them in the output. This applies to all versions of FM since v.9!
    However, there is a workaround for this. You need to use the hierarchical book structure in the parent book and create Folders for each book that you want to add. Then manually add the generated files (TOC, IX, List of..., etc.) and book to the respective folder. This is what it looks like for two child books in a parent book:
    Note that the child book generated files (TOC, IOR) show as just regular files at this point in the parent book. To get the page numbering to be continuous throughout the parent book, you will need to make a couple of passes. First set folder, files and books to have the Numbering continue from the previous (if you want all sequential page numbers). This will set the page numbers correctly except for what they were in the respective book TOCs. You will need to use the starting page number of the child TOC files in each folder (it shows in the Book status bar when click on the TOC file in the master/parent book).
    To set the individual book TOCs to be correct in the parent book, open the child book and set the TOC Numbering to start at the page stated in the parent book (status bar). Now update the child book to set the correct (parent book) page numbers in the child TOC. [This is a necessary manual step, as the page number assigned in the parent book is ignored when th child book is individually updated and FM uses 1 to start off the sequence in the child book.]  Repeat for each child book in the master/parent book.
    The final step is to Update the parent book and create the PDF. You should now have all of the files included in the PDF and the child TOCs should show the correct page numbers of the master book.
    This whole process of books within books seems a bit borked and one shouldn't have to be jumping through hoops to include child generated files. Please report this as a bug via: https://bugbase.adobe.com/index.cfm

  • How to get the Page Number in CS3 with VB?

    Hi, Everybody
    I use the Visual Basic to read the words and their page number where the Words are at. I want to do it according to Story. Some TextFrame of the Story waw placed in other pages: How can I get the Page number according to the Word that is selected?
    For myStoryCounter = 1 to Document.Stories.Count
    Set myStory = Document.Stories.Item(myStoryCounter)
    For myWordCounter = 1 to myStory.Words.Count
    Set myWord = myStory.Words.Item(myWordCounter)
    myWordContents = myWord.Contents
    Rem ** How to Get the Page Number according to the Word ***
    Next
    Next

    > But I don't understand why Item(1) are set.
    because Word can have more than one parent TextFrame - when split across TextFrames
    only Character have one ParentTextFrame accessed also by ParentTextFrames.Item(1)
    > why Story.TextFrames.Count alway is 0, Is it bug?
    no - it's not bug
    in older IDs - Story.TextFrames collection refer to all TextFrames as containers for Story text
    but in CS3 - collection Story.TextFrames contain all TextFrames inserted as InLine/Anchored objects - same like Story.Rectangles or Story.Ovals
    in CS3 - when you want to refer to TextFrames as containers for Story text - you need to use Story.TextContainers - because now you can link TextFrame and Text-On-Path as Story - Text-On-Path isn't TextFrame
    robin
    www.adobescripts.com

  • How to get the serial Numbers issued for an STO

    Hi,
    I created my own STO and mapped a serialised material for the same using transaction. I increased the stock by issuing serial numbers. The /SYCLO/MM_DOPURCHASEORDER_GET BAPI returns the PO header, item and longtext details. I want the serial numbers which are issued to the STO and the list of serial numbers for which the receipts has been done.
    I want to know how to get the serial numbers which are issued to the STO throught the standard function module. I want only the issued serial numbers not the one for which the receipts has been done.
    I tried using the standard BAPI, "BAPI_PO_GETDETAIL1" to get the serial number collection. But the FM is not returning the issued serial number as well as the list of serial numbers for which the receipts has been done. It is returning only the PO history in which the list of document number are present.
    Thanks in Advance,
    Mohan.

    Hi,
    Using the transaction "MB1C" and movement type "561", I filled the required details such as Material Number, Quantity, Storage Location and Batch. After filling all these details, when I press enter, it will ask for me to enter the serial numbers equal to the quantity specified. I entered the serial numbers by selecting the available serial numbers for that particular material by pressing F4 help.
    Please let me know if you need any more inputs in this regards.
    Thanks,
    Mohan.

  • How to get the page number according to MarkerID?

    I want to get the page number according to the marker element in fdk. I can get the marktext and markid,How to get the page number according to MarkerID in fdk?

    zhaopeng,
    You need to first get the ID of the paragraph containing the marker (with FP_TextLoc), then get the top-level frame containing the FO_Pgf object (FP_InTextFrame), then get the page containing the FO_TextFrame object (FP_PageFramePage). Here is a function that you can send various objects to in order to get the page ID, including paragraphs (this courtesy of Rick Quatro, originally posted to the Yahoo Framedev list):
    F_ObjHandleT GetPage(F_ObjHandleT oDoc, F_ObjHandleT oObj)
      F_ObjHandleT oFrame = 0;
      IntT iObjType;
      F_ObjHandleT oRow, oCell;
      while(oObj)
        oFrame = oObj;
        iObjType = F_ApiGetObjectType(oDoc, oObj);
        switch(iObjType)
          case FO_SubCol:
          oObj = F_ApiGetId(oDoc, oObj, FP_ParentTextFrame);
          break;
          case FO_Tbl:
          oRow = F_ApiGetId(oDoc, oObj, FP_FirstRowInTbl);
          oCell = F_ApiGetId(oDoc, oRow, FP_FirstCellInRow);
          oObj = oCell;
          break;
          case FO_Row:
          oCell = F_ApiGetId(oDoc, oObj, FP_FirstCellInRow);
          oObj = oCell;
          break;
          case FO_Cell:
          case FO_Pgf:
          case FO_AFrame:
          oObj = F_ApiGetId(oDoc, oObj, FP_InTextFrame);
          break;
          case FO_TextLine:
          case FO_TextFrame:
          case FO_UnanchoredFrame:
          case FO_Arc:
          case FO_Ellipse:
          case FO_Group:
          case FO_Inset:
          case FO_Line:
          case FO_Math:
          case FO_Polygon:
          case FO_Polyline:
          case FO_Rectangle:
          case FO_RoundRect:
          oObj = F_ApiGetId(oDoc, oObj, FP_FrameParent);
          break;
          //endless loop prevention, stops the process when the top-level frame is reached
          default:
          oObj = 0;
          break;
      //if we found the top-level frame, return its page ID, otherwise null
      if(oFrame)
        return (F_ApiGetId(oDoc, oFrame, FP_PageFramePage));
      else return(0);
    ...so, you would do something like this if you have the marker ID:
    F_TextLocT textLoc;
    F_ObjHandleT pageId;
    textLoc = F_ApiGetId(docId, markerId, FP_TextLoc);
    pageId = GetPage(docId, pageId.objId);
    Note: I'm not sure how this handles the case where a paragraph extends across two pages and the marker is located on the second page. My thought is that it might erroneously return the page where the paragraph begins. I don't know how to handle that.
    Russ

  • How to change the page order in Microsoft word 2008

    Hi, can you tell me how to change the page order in Microsoft word 2008, thanks

    http://answers.microsoft.com/en-us/mac

  • How to get the Benefits Rate multiplier value in HCM extract ? used Extract rule type Fastfomula, but returns null.

    how to get the Benefits Rate multiplier value in HCM extract ? used Extract rule type Fastfomula, but returns null.
    Formula:
    DEFAULT FOR BEN_ABR_NAME IS 'NA'
    DEFAULT FOR l_rate_multiplier IS 'X'
    L_BG_ID = GET_CONTEXT(BUSINESS_GROUP_ID, 1)
    L_EFF_DATE = GET_CONTEXT(EFFECTIVE_DATE, to_date('1951/01/01 00:00:00'))
    L_ABRT_ID = GET_CONTEXT(ACTY_BASE_RT_ID, 9999)
    CHANGE_CONTEXTS(EFFECTIVE_DATE = L_EFF_DATE, BUSINESS_GROUP_ID = L_BG_ID, ACTY_BASE_RT_ID = L_ABRT_ID )
    l_rate_multiplier = BEN_ABR_NAME
    RETURN l_rate_multiplier

    I used DBI - BEN_ABR_NAME.
    What is back end query ? can we use query to extract the value in Extracts ?

  • HPOfficeje​t Pro 8600 does not print the page as shown in WORD. I am using win 7, 32-bit OS.

    HPOfficejet Pro 8600 does not print the page as shown in WORD. I am using win 7, 32-bit OS. How do I fix this?

    Sounds like the table is to large to fit on a single page. Have you tried using the "Shrink to Page" option in the Print Preview? Depending on your version of Word, my attached picture may not be 100% similar but it should be enough to give you an idea. Here is the option inside the print preview menu:
    Let me know if this resolves your issue
    -SeanS
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to get the total numbers of pages have been printed using pl/sql

    Dear All ,
    I want to store the total number of physical pages printed into a database table,, how could I retrieve the value of the total number of pages .
    I am using Oracle Report 6i
    thnxxx in advance :)

    At the end of your report (i.e. after all the frames from your data model) place a dummy field. You can get the page number with srw.get_page_num in the format trigger of this field. Since this is the last field of your report, this is also the last page number.

  • TS1292 I scratched my itune card and some of the numbers came off. Please advise how to get the missing numbers

    I scratched my iTunes card and some of the numbers have come off. How do I get the missing numbers?

    See this support article:
    http://support.apple.com/kb/TS1292
    If you can't get to work after perusing that page, contact the iTunes Store Support; instructions are at the bottom of that article.
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • How to get the page FUNCTION NAME?

    Hi All,
    How can I get the page Function Name? I tried below codes but it returns null value.
    <i>pageContext.getPageLayoutBean().getAttributeValue(FUNCTION_NAME)</i>
    Please help. Thanks!

    Sorry guys, i got it now.
    instead of getAttributeValue, use .getPageFunctionName()
    :-)

  • How to get the page layouts programmatically and create a page for that pagelayout

    how get the page layouts programmatically and create a page for that pagelayout and add webpart
    please help me with da code.Thanks
    adityadugyala

    Hi if your page layouts alreday created then create new page programaticaaly  and apply your page ayouts to that page by coding you can do something like following
    PublishingWeb publishingWeb =
    PublishingWeb.GetPublishingWeb(web);
    PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts();
    PageLayout layout = layouts[0];
    string pageName =
    "MyPublishingPage5.aspx";
    PublishingPage newPage = publishingWeb.GetPublishingPages().Add(newFolder.Folder.ServerRelativeUrl +
    "/"+ pageName, layout); 
    newPageUrl = web.Url +"/" + newPage.Url;
    newPage.Description = "This my sample publishing page";
    newPage.Title = "My Publishing Page";
    newPage.Update();
    Please follow link
    http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/create-publishing-pages-in-portal-sites-programmatically.aspx
    Please mark answer , if you think answer is helpful or correct.

Maybe you are looking for

  • Can't play vimeo in Safari 5.0.3

    Anyone else having this problem? I can't play any video in vimeo on Safari. I'm running a freshly updated 5.0.3 on my new iMac, and also 5.0.3 on my wife's MacBook Pro (mid 2007 model). I've removed and reinstalled Flash, cleared the cookies and the

  • Gettinhg WLSTException: MDS-00039 while attempting to import dataset

    Hi I am getting the below error while importing dadaset using weblogicImportMetadata.sh script. ------------------------------------------------------------------Error-----------------------------------------------------------------------------------

  • How to pass security context in

    Hi, I am running BIP reports (Enterprise Edition) against application that requires a VPD context to be set up. How do I do this - is there anything like a LOGIN TRIGGER in BIP. I know that I can use a beforeReport trigger - however, I have a set of

  • Standard Program for User Maintaince

    hi friends can anybody give me the standard prograname in which has output , user name , tcode which has acces with descriptions regards

  • Packet drops on 2960 with port-security enabled

    Hello, We are using the following port-security configuration on user access ports on Cisco 2960 switches, in order to protect the infrastructure to prevent MAC flooding attacks: switchport port-security maximum 10 switchport port-security switchport