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>

Similar Messages

  • 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

  • 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

  • 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 to get the full image directory when i upload the image to web page???

    hai, how to get the full image directory when i upload the image to web page???
    here is the example:
    <form action="uploadfile.jsp" method="post">
    image<input type="file" name="image" />
    <input type="submit" value="submit"/>
    <%
    String s=request.getParameter("image");
    %>
    <%=s%>
    </form>
    i upload the image from C:\image\center.gif. i use request.getParameter just can get the image name like "center.gif". Can anybody help me how to get the full path name. Thanks a lot..

    There is no need to get the path. It is also fairly pointless as the server cannot access the client's local file system.
    Carefully read this article how you can upload files the right way: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • 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].

  • How to get the number of bytes at TCP port

    Hi all,
    How to get the number of bytes to read at the TCp port...as someone had suggested in some forum we do read the number of bytes first and then pass this...
    but we get a problem when we have FF data in this...because then it sends 2 FF data...and cause of this we skip the last data...is there any solution for the same?

    Hi
    In LabVIEW you don't have the same property as in serail port.
    You havn't "Byte at TCPIP port".
    if you developp a protocol, one soltion, is to send the size to read.
    Ingénieur d'Application / Développeur LabVIEW Certifié (CLD)
    Application Engineer / LabVIEW Certified Developer (CLD)

  • How to get the number of decimal places configured for a site column

    Hi,
    I have a column 'SampleNumCol' of type Number, the number of decimal places to be displayed is configured as 2.
    The column conatins a value, but when retrieved programatically is displayed as 5.00000000  instead of 5.00.
    I am retrieving this column using listitem.Properties[field.InternalName].
    I need to trim the decimals based on  number of decimal places configured for the site column.
    How to get the number of decimal places configured for a site column?
    Thanks in advance,
    dhijit

    Get the field as SPFieldNumber and then check DisplayFormat which returns
    SPNumberFormatTypes
    SPFieldNumber numberField = list.Fields.GetFieldByInternalName("YourNumberFieldName") as SPFieldNumber;
    SPNumberFormatTypes numFormatType = numberField.DisplayFormat;

  • How To get the number of request's for a single Composite Application

    Hi can any body tell how to get the number requst's for a single composite application.
    Thanks
    Mani

    Hi,
    There are lots of STATE is available for composite instances, like mentioned in the below query. I hope you will get answer from the below query.
    SELECT (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
    WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
    WHEN STATE=3 THEN 'OPEN AND FAULTED'
    WHEN STATE=4 THEN 'CLOSED AND PENDING'
    WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
    WHEN STATE=6 THEN 'CLOSED AND FAULTED'
    WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
    WHEN STATE=8 THEN 'CLOSED AND ABORTED'
    WHEN STATE=9 THEN 'CLOSED AND STALE'
    WHEN STATE=10 THEN 'NON-RECOVERABLE'
    ELSE STATE || ''
    END) AS STATE, component_name, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE where composite_name='PASS THE COMPOSITE NAME HERE..........'
    group by (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
    WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
    WHEN STATE=3 THEN 'OPEN AND FAULTED'
    WHEN STATE=4 THEN 'CLOSED AND PENDING'
    WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
    WHEN STATE=6 THEN 'CLOSED AND FAULTED'
    WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
    WHEN STATE=8 THEN 'CLOSED AND ABORTED'
    WHEN STATE=9 THEN 'CLOSED AND STALE'
    WHEN STATE=10 THEN 'NON-RECOVERABLE'
    ELSE STATE || ''
    END), component_name;
    Thanks,
    Vijay

  • [Win VC++ 6.0 ]How to get the number of files count in a folder using VC++ 6.0?

    Hi all,
    Can any one tell how to get the number of files(.EPS) count inside a folder when the folder path is specified in VC++ 6.0?
    Thanks in Advance.
    Regards
    myriaz

    I'm a little confused by the question, but it sounds like you're asking how to count the number of files with a particular extension in a given directory? That's not really an AI SDK question, but it's a fairly easy one to find if you google it. If you're trying to use Illustrator to do it, AI doesn't have a general purpose file API. It has a few functions to do some things that Illustrator needs, but I don't think enumerating directories is one of them.

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

Maybe you are looking for

  • Email Setup Application Does Not Work After Update

    I seem to be having the same problem as others with the email setup application. When I updated my Blackberry to the new OS6, I went to my email setup and it said "looking for updates" It finds a new update from my already installed email setup app 6

  • [SOLVED] Problem with cron and unison

    I've got a very strange problem I cannot solve. I have set unison to synchronize my laptop (mercure) against my home computer (jupiter). It works really fine. I can run it from the terminal: unison -batch CERTES and it runs good. I have set ssh keys

  • How can I force a out-of-date client to do a sync with master?

    I use 'DB_REPMGR_ACKS_NONE' for some clients which locate in different areas. But sometimes the network is not that good, and causes the client data out-of-date. My question is that: 1. Is there a api that can do a manual sync without restarting the

  • IBook G3 (USB): Unable to connect to the internet

    Good Morning; I am having a problem with my iBook G3 Model M7701ll, 600 mhz which I just bought. The iBook is running OS 10.4.7 I live remote and my only connection to the web is dial up with a 24.4K connection on my G4 using a external USB Modem. I

  • Same PIR updation for multiple vendors

    Hi, How to update the PIR for multiple vendors at a time whenever there is change in price. Thanks, Kiran Bodla