How to get the number of pages in a PDF file with AcroPDF ActiveX control

Hi,
I am using the AcroPDF ActiveX control provided by Acrobat Reader and Professionals(version 9). I just wonder if I using LoadFile to load a PDF document, how can I know the number of pages in that PDF? I do not find any properites or methods that can do that.
Thanks
Alan

Hi unk2,
There's no functionality in the Acrobat.com online services to do a character count. But, you could use ExportPDF to convert your PDF file to Word format, and then do your character count in Word.
Please let us know if you need additional assistance.
Best,
Sara

Similar Messages

  • How to get the number of pages when assemble pdf with DDX

    Hi,
         I have tried to add two bookmarks to one pdf with DDX(in java code),
         the first bookmark I shall add to the first page,and the second I shall add to the second page....
        the question is:
         If the pdf has only one page, I will not add bookmarks to the pdf. so I need to get the pages of pdf before my processing.
        but I did not found any APIs in the SDK about it .
         Can anyone help me.
         thanks.

    I have solve the problem myself
    I use the tag "DocumentInformation" in DDX and get the xml after invoking DDX,
    the xml contain the information of document
    the sample DDX as:
         <?xml version="1.0" encoding="UTF-8"?>
       <DDX xmlns="http://ns.adobe.com/DDX/1.0/">
               <DocumentInformation source="mergedPDF" result="doc_info.xml" />
       </DDX>

  • Function Module to determine the number of pages in a pdf file

    Hi All,
    Is there any standard function module to determine the number of pages in a pdf file?
    Thanks,
    Sai

    Hi unk2,
    There's no functionality in the Acrobat.com online services to do a character count. But, you could use ExportPDF to convert your PDF file to Word format, and then do your character count in Word.
    Please let us know if you need additional assistance.
    Best,
    Sara

  • How to get the number of page by creating OLE microsoft word document

    Hihi Experts,
    I have generated a word document using ole in sap abap report.
    May i know which command can i use to call the word object to get the number of page before closing the word document?
    eg. call method of wordobj 'insertpagefield' ? and i need to require the page number in a variable eg. gv_pagenumber for other filtering purposes.
    Thanks and Regards,
    li Hui
    Edited by: lihui lil on Aug 11, 2009 9:35 AM
    Edited by: lihui lil on Aug 11, 2009 12:36 PM

    hi,
    use the following code:
    CALL METHOD OF gv_selection 'Information' = gv_curpage
        EXPORTING
        #1 = 3. " get current page number
      CALL METHOD OF gv_selection 'TypeText'
        EXPORTING
        #1 = gv_curpage. "show current page number
      CALL METHOD OF gv_selection 'TypeText'
        EXPORTING
        #1 = ' of '.
      CLEAR gv_endpage.
      CALL METHOD OF gv_selection 'Information' = gv_endpage
        EXPORTING
        #1 = 4. "get total page number
      CALL METHOD OF gv_selection 'TypeText'
        EXPORTING
        #1 = gv_endpage. " show total page number
    Edited by: VoonHan on Oct 13, 2009 7:35 AM

  • How to get  the number of page which exists the change bar ?

    In FDK development, I want to find the number of page which exists the change bar.

    zhaopeng,
    You can get the page number by querying the FP_PageNum property of the FO_Page object:
    pageNum = F_ApiGetInt(docId, pageId, FP_PageNum);
    ...or you can use FP_PageNumString if you are using string page numbers.
    If you do not have the ID of the FO_Page object, you can get it from the paragraph ID using the following function, courtesy of Rick Quatro, posted to the Yahoo Framedev list. Send the paragraph (FO_Pgf) ID as oObj and it will return the page ID:
    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:
    // handle FO_Pgf case
    case FO_Pgf:
    // handle FO_AFrame case
    case FO_AFrame:
    oObj = F_ApiGetId(oDoc, oObj, FP_InTextFrame);
    break;
    // handle graphic object cases
    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;
    default:
    // prevents loop if unknown object type is found.
    oObj = 0;
    break;
    if(oFrame){
    // Use FP_PageFramePage to get the page identifier of the object.
    return (F_ApiGetId(oDoc, oFrame, FP_PageFramePage));
    else
    return(0);
    Russ

  • How to get the number of routes in MLS L3SW table with SNMP

    Hello experts,
    Is there any way to get the number of routes in the MLS-hardware Layer 3-switching table with SNMP, like with CLI command "show mls cef summary"?
    If possible, please let me know the OID and which MIB do I use.
    [e.g.]
    #show mls cef summary
    Total routes: 400000
    <omit>
    ====
    Device : C6509E
    IOS : s72033-advipservicesk9_wan-mz.122-33.SXH3a.bin
    ====
    Thank you,

    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt"+></td></tr>";
    document.profileform.submit;
    on submit it goes to the second page, but the value i got using >>>System.out.println("row number from text >>>box"+request.getParameter("rowNum")); is null. What is wrong with >>>my coding. Can anyone solve this.HI carry
    Check the value of bold data
    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));var cnt=inRow
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt+"></td></tr>";
    document.profileform.submit;
    }try with it

  • Getting the number of pages in a PDF [JavaScript in CS3]

    Hello All,
    I am an InDesign JavaScript newbie that will be posting questions in the near future. Before asking a lot of questions, I would like to contribute something to the group. Here is a function that will query a PDF and return the number of pages that it contains. This is useful for placing multi-page PDFs.
    Rick Quatro
    rick at frameexpert dot com
    function GetPdfPageCount(oFile)
    // Convert filename to a VBS-friendly format.
    var sFile = oFile.fsName.replace(/\\/g, "\\\\");
    var aFile = [sFile]; // An array of arguments.
    if(File.fs == "Windows"){
    var sGetPdfPageCount = "Dim AcroApp, AVDoc, PDDoc, iPages\r";
    sGetPdfPageCount += "Set AcroApp = CreateObject(\"AcroExch.App\")\r";
    sGetPdfPageCount += "Set PDDoc = CreateObject(\"AcroExch.PDDoc\")\r";
    sGetPdfPageCount += "If PDDoc.Open(arguments(0)) Then\r";
    sGetPdfPageCount += " iNumPages = PDDoc.GetNumPages()\r";
    sGetPdfPageCount += " Set oInDesign = CreateObject(\"InDesign.Application\")\r";
    sGetPdfPageCount += " oInDesign.ScriptArgs.SetValue \"ScriptArgumentA\", CStr(iNumPages)\r";
    sGetPdfPageCount += " PDDoc.Close()\r";
    sGetPdfPageCount += "End If\r";
    sGetPdfPageCount += "Set AcroApp = Nothing\r";
    sGetPdfPageCount += "Set PDDoc = Nothing\r";
    app.doScript(sGetPdfPageCount, ScriptLanguage.visualBasic,aFile);
    return Number(app.scriptArgs.getValue("ScriptArgumentA"));
    else
    return 0;

    Hi Peter,
    The solutions that open the PDF files with f.open and look for particular strings don't work for all of the PDF files I have. This one seems to work well for me so far. Thanks for the link.
    Rick

  • How do change the sequence of pages in a PDF file. Need to move page 3 to 12

    How do I change the page sequence in a document. eg Want to move page 3 to 12

    Hi leoniep,
    To reorder pages in a PDF, you need to use Acrobat (you can drag the page thumbnails to rearrange the pages). If you don't have Acrobat, you're welcome to try it for free for 30 days. See http://www.adobe.com/products/acrobat.html for more information.
    Best,
    Sara

  • How can I get the number of pages of a report?

    Hello to everyone, I'm writing a small app that exports a report to PDF (the app is done and everything is ok).
    Along with the PDF I need to create an XML file that describes the PDF file properties. One of the properties I need to supply is the number of pages of the PDF file. How can I ask Crystal Reports SDK for the number of pages my ReportDocument is made of?
    Best regards
    Alessandro

    Hello Alessandro,
    I found a Business Objects Note with a possible solution.  You can search for Notes yourself by starting at the Business Objects area of this SAP Community Network (SCN) site.
    Go to the [Business Objects link|https://www.sdn.sap.com/irj/boc] in the menu bar on SCN.
    Then go to the [Support link|https://www.sdn.sap.com/irj/boc/businessobjects-support] in the sub menu for Business Objects.
    Now go to the [Business Objects Note link|https://www.sdn.sap.com/irj/boc/businessobjects-notes] in the left side navigation menu.
    Finally, click on the [Search Business Objects Notes link|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true] in the middle of the page.
    From the Notes Search page click on the Advanced Search link.  For your question I searched on these terms - net page number - and added "boj" (without the quotes) in the Component field for Advanced Search.  The "boj" component helps limit the search to Business Objects components - like the Crystal Reports .NET SDK.
    This search brought up a number of results.  The second result looks like it will address your question:
    "[SAP Note 1216240|https://bcp.wdf.sap.corp/sap/sapnotes/display/0001216240] - How to retrieve the number of pages from a ReportDocument in VS .NET"
    I hope this helps!
    Sincerely,
    Dan Kelleher

  • Indesign CS3: How to get the number of the current layer?

    Hallo!
    How to get the number of the current layer in a page?
    Thanks,
    Alois Blaimer

    InterfacePtr<ILayerList> layerList(documentUIDRef, UseDefaultIID());          <br /><br />int32 layerCount = layerList->GetCount();<br /><br />To findout layer name use<br /><br />IDocumentLayer* documentLayer = layerList->QueryLayer(layerIndex);<br />                         <br />PMString layer=documentLayer->GetName();

  • How to get the no of pages in a report?

    Hi All,
    I have a requirement to get the number of pages in the crystal report.
    I found that the following method of IReportSource gives the value.
    public int getLastPageNumber(com.crystaldecisions.sdk.occa.report.application.IRequestContext requestContext)
                          throws java.lang.NullPointerException,
                                 ReportSDKException
    But the issue issue is with the paramter requestContext. How can I get this requestContext.
    Appreciate your time.
    Regards,
    Anil Chowdary K

    Because of the page on demand feature, by default there is no clean way to get the page number, because each page is generated as requested.  To get the total page count, the viewer must render the entire report first.  The easiest way to accomplish this is to use the CrystalReportViewer object and call the showLastPage() method, then using the CrystalReportViewer object generate a ViewInfo object, and call the getPageNumber() method.
    For more information review the Viewer documentation in our [SDK Library|http://www.sdn.sap.com/irj/sdn/bi-sdklibrary].

  • Getting the number of pages in excel sheet or current page using OLE2

    Hi,
    I fill an excel sheet using CLIENT_OLE2 from Oracle 10g form,
    I want to get the number of pages in sheet or the number of current page,
    after searching for solution I found this example on VB:
    Sub GetPageCount()
    Dim iView As Integer
    Dim iHorizontalBreaks As Integer
    Dim iVerticalBreaks As Integer
    Dim iPageCount As Integer
    On Error Resume Next
    'go to the range and set PrintArea to the range name
    Application.Goto Reference:="ABC"
    ActiveSheet.PageSetup.PrintArea = Selection.Address
    'turn monitor flickering/updating off
    Application.ScreenUpdating = False
    'remember current View setting
    iView = Application.ActiveWindow.View
    'refresh the print area
    Application.ActiveWindow.View = xlPageBreakPreview
    'set view back
    Application.ActiveWindow.View = xlNormalView
    'turn monitor flickering/updating back on
    Application.ScreenUpdating = True
    'calculate the # of pages
    iHorizontalBreaks = ActiveSheet.HPageBreaks.Count + 1
    iVerticalBreaks = ActiveSheet.VPageBreaks.Count + 1
    iPageCount = iHorizontalBreaks * iVerticalBreaks
    How can I implement this using CLIENT_OLE2?
    Any assistance would be welcome.
    Thanks

    IF all the panels were exactly the same width (highly doubtful for a roll-fold) and IF ID supported 12 pages per spread (it doesn't) then it might be less work to make 12-page spreads and place the PDF twice, but since I think there's a really good chance you'll need to adjust the positioning for at least 22 pages, that seems doomed.
    I wouldn't even bother, in this case, with facing pages. Presumably they want this for the screen, so there's nothing gained from facing pages or multiple columns. You can either make the file with 24 pages and place the PDF 12 times for each page of the PDF, or place each page of the PDF once in a 2-page file, then copy the pages and reposition the image in the frame for each panel. The big thing here is to put the PDF into frames that are the same size as the new page (so they get cropped down to one-panel on each page). Then it's just a case of sliding the the PDF left or right in the frame to expose the next panel.

  • How to get the number of days in a month?

    hi all
    is there any way to get the number of days in a given month with a given year? for instance, if year is 2004 and the month is July or February, how can i get the number of days? thanks.

    Gee, I don't know ... Maybe this:
    Calendar cal = Calendar.newInstance();
    cal.set(Calendar.YEAR, 2004);
    cal.set(Calendar.MONTH, Calendar.FEBUARY);
    System.out.println("max days in month: " + cal.getActualMaximum(Calendar.DAY_OF_MONTH));
    Do you not bother reading what people have already posted? Read the API docs on the Calendar class.

  • How to get the number of columns in a result set???

    hi everyone..
    i am trying to establish a servlet applet communication....
    my applet send the sql query to the servlet as serialised string and then the servlet executes the query...
    Since i need to pass the result back to the applet, i thaught of passing the whole reult set to the applet..but that seems to be not possible..
    so i thaught of storing my result set data in a vector and then pass the vector,but the first problem that i came across is that how to get the number of colums in a result set....
    so is there a way to get the number of columns in a result set...???
    and also i would like to know if it possible to send my whole result set to the applet bye serialization or by any method...???
    thanx in advance

    You shouldn't do. It expenses resources (you should always close the ResultSet and the Statement as fast as possible). Simply gently process it into a Collection or Map of DTO's. Those are serializable.

  • How to get the number of files currently open?

    hi,
    does any one know how to get the number of files currently open in windows OS?
    e.g. lets say .txt files...
    any comment will be really appreciated.
    thanks

    Assuming that you don't want to actually do this from within Java code (which would obviously require native code), here's a utility that will give you a list of which file handles are opened by which processes (on Windows):
    http://www.sysinternals.com/ntw2k/freeware/handle.shtml
    - K

Maybe you are looking for

  • Apple TV, mirroring, wireless cam...

    I have a newer iMac and recently purchased AppleTV.  I would essentially like to video conference from my living room via mirroring AppleTV and my iMac (which is in an adjacent room) but cant really understand how I could use an external cam from the

  • Updating a table from tabular form using a process

    Hi I have a tabular from creating using wizard I've a field called Last_updated_by in the table the username is assigned to an item P2_user based on the user who logs in. What I need is,when any row is updated, I need to update the last_updated colum

  • HT201250 Time machine backup permission issue

    Hi, We setup time machine backups in an office environment which is managed by a mac OS X Lion server. Each device on the network (all mac minis) is configured to take hourly backups to the drive on our server. On some occasions, a device requests an

  • Light thing appear on Macbook Pro retina

    Why this light thing appear in my Macbook Pro retina bottom screen everytime i put on sleep mode? btw, i'm new Macbook user

  • Bug in OraclePreparedStatement??

    I'm trying to execute a batch with a few of exactly the same statement. If I have 6 times the same statement and I make a batch of 3 statements, it is only executed twice. But when I have 6 diferent statements and batches of 3 statements, 6 statement