How to report current page number to the browser...

I need to dynamicaly attach a script in a bunch of PDF files. The script will be attached when the user requests the document and the document will be embeded in the page like this:
<embed id="PDFObj" src="test.pdf" width="100%" height="100%">
I have a JavaScript in my webpage with a message handler:
var PDFObject = document.getElementById("PDFObj");
PDFObject.messageHandler =
  onMessage: function(aMessage)
    switch (aMessage[0])
      case "_pdf_PageOpened":
        alert("!_pdf_PageOpened!\n" + aMessage[1]);
        break;
I'm using hostContainer.postMessage on Page/Open event and it works just fine when the event(action) is manualy attached.
My question is:
How to attach the Page/Open event on every page in the PDF file using script that runs on Acrobat Reader?
In Acrobat Pro I can use Doc.setPageAction() but it doesn't work in Acrobat Reader that is embeded in the browser window.
OR
Is there any other way to report the current page number to the webbrowser for an embeded PDF?

Hi,
to get the current page, you can use the index of your master page ("Restricted").
$ = $.parent.index +1
and for the total pages use
$ = $layout.pageCount()

Similar Messages

  • How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    How do I put page number at the center of the bottom of page one and the rest of the page numbers at top right corner?

    Put a section break at the bottom of page 1
    Then insert your page number in the footer of page 1.
    Go to page 2 and click in the body of the text;
    Inspector > Layout > Section > uncheck Use Previous Headers & Footers > click in Header on page > insert > Page Number
    Peter

  • Current Page Number

    Hi,
    I'm a newbie at any kind of Acrobat development, but can't seem to find a way to get the current page number on the client side of a pdf loaded into Reader. Is there a fairly painless way to do this? Additionally, it'd be cool to be able to change pages using client-side script as well (I'm currently re-loading it with the #page= attribute)...can I do that easily?
    Here's a short description of the app so that my questions make a little more sense:
    - Dropdowns on the left to drill down to a specific set of options. Iframe on the right that loads a corresponding pdf and loads the proper page for the dropdown options the user has selected as they drill down.
    - Need to be able to reverse the process somehwat so that if the user goes to a page in the pdf on the right I can update some of the info on the left.
    Any tips on how to accomplish this are greatly appreciated! :)
    Thanks!

    Thanks, Malky! I have been looking more into that aspect of the sdk now and it looks promising. However, I've downloaded the samples and can't seem to get any of them to work. I even tried the html sample figuring it'd be the easiest to get running, but the control specified by the object tag won't load (and doesn't error or anything like that). Can you point me in the right direction for getting started with the IAC stuff? Do I need to have Acrobat in order to do this or something? Thanks for your help!

  • How to know the total page number of the standard report

    How to know the total page number of the standard report?
    If I insert a graph, a table, or text into the end of the standard report, how to know how much space is left for the current page?

    Hello Net,
    Unfortunately, we do not have any VIs in LabVIEW that can figure out the number of pages of a standard report. However, with the use of ActiveX calls you can achieve this task. Here are a couple of discussion forums which discuss this:
    Excel Page Numbering with ActiveX:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=194479&requireLogin=False
    Number Pages in Word Report:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=162972&requireLogin=False
    There is also great documentation on using ActiveX on msdn. You can search this document for page number objects. Here is a link to this:
     http://msdn2.microsoft.com/en-us/library/aa223048(​office.11).aspx
    Please refer to these links. If you still have questions please feel free to let us know so we can assist you.
    Thank you
    Best Regards,
    Dominic L.

  • How to you reference the current page number and total pages in a script?

    I'm trying write a small script to make field invisible when the current page equals the total number of pages, but with no luck.
    Can anyone advise how to do this?
    I've tried various ways to reference my fields, this being the most basic:
    if(pageNumber == totalPages) {
    continuedBase.presence = "invisible";
    // pageNumber has a run time property as "Current Page Number"
    // totalPages has a run time property as "Number of Pages"
    // continuedBase is a text field within the same subform as pageNumber and totalPages
    Thanks for any help offered.
    Russell

    If you are asking how to get the current page and total pages you acn use these commands:
    current page ----- xfa.layout.page(this)
    total pages ------ xfa.layout.pageCount()
    so your code woudl look like this:
    app.alert("The curent page is: " + xfa.layout.page(this));
    app.aler("The total number of pages is: " + xfa.layout.pageCount());
    if(xfa.layout.page(this) == xfa.layout.pageCount()) {
    continuedBase.presence = "invisible";

  • How to Get last page number in report 10g

    I want to get last page number in report but Current page number found from srw.get_page_num(n)
    but i want to get last page number for conditional formating like this
    srw.get_page_num(current_page)=last_page
    pls help me how can get last page number;
    pls help;
    thanks in advanced;

    Hi,
    you can use the Property Print Object On for this.
    Regards
    Rainer

  • 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 to print logical page number in TOC of report

    My report has three sections - header, main, trailer.
    after each group break in the main section the page number is saved using the srw.get_page_num(pageNum).
    this records are used to build the toc in the trailer section.
    Problem: srw.get_page_num delivers only the logical pagenum of the section,
    means if the header section spans more than one page (for example 2), the main section starts at physical pagenum 3.
    If I don't know how many pages my header contains I never have the real page number in my toc, beacuse i have to add the number of "header pages" to the saved pagenum of the main section to compute the "physical pagenum".
    Is there a possibility to save the physical pagenum in the header section (in a trigger) ?
    Message was edited by:
    [email protected]

    Thats my huge problem - i can not calculate the number of pages
    nor in the main section neither in the header section.
    The problem is not to know how many pages are in the trailor section.
    I have to know, how many pages are in the header section without to start multiple the report.
    If I have this number i can add it to the "logical" page number" of the main section to get the physical page number of the report.
    the page numbers of the main section are available.
    Message was edited by:
    [email protected]

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

  • How to disable showing page number on oracle report

    Hi,
    when i am using ttitle and btitle options in oracle report, page number & date gets automatically added top of my report. Is there any option if i don't want these two to appear on my report. how can i disable them.

    Hi,
    user8531525 wrote:
    Hi,
    when i am using ttitle and btitle options in oracle report, page number & date gets automatically added top of my report. Is there any option if i don't want these two to appear on my report. how can i disable them.When you use the word "report", people (like Tubby) are likely to think you are using Oracle Reports, rather than SQL*Plus. Avoid the word "report", or else make it clear what you're doing.
    By default, TTITLE puts the date on the left, and the page number on the right.
    If you don't want them, put something else there. Explicitly put an empty string there, if you don't want anything else:
    TTITLE  LEFT ""   CENTER "Monthly Firbolig Summary"   RIGHT ""

  • 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 add a receipt number in the following Query for PO Report

    Hi Guys,
    I need a help regarding following query.
    Its a PO report for 11.5.10.2
    select distinct pv.segment1 supplier_number,
    pv.vendor_name supplier_name,
    pha.segment1 po_number,
    pha.revision_num revision_num,
    pha.authorization_status po_status,
    to_char(pha.creation_date, 'DD/MM/YYYY') creation_date,
    pha.currency_code currency_code,
    pla.sum_amount_ordered sum_amount_ordered,
    pda.sum_quantity_ordered sum_quantity_ordered,
    pda.sum_amount_received sum_amount_received,
    pda.sum_quantity_received sum_quantity_received,
    (pla.sum_amount_ordered - pda.sum_amount_received) sum_accrued, --AVI
    ( pda.sum_quantity_ordered - pda.sum_quantity_received) quantity_accrued, --AVi
    to_char(rsl.date_receipt, 'DD/MM/YYYY') date_receipt,
    -- rsl.receipt_num receipt_number,
    ppa.segment1 project_code, ppa.project_status_code, --10.0.0.4
    aia.invoice_num invoice_num,
    aia.invoice_date invoice_date, --AVI 
    aia.creation_date invoice_creation_date, --AVI 
    aia.amount invoice_amount_allocated_to_po, --AVI
    pla.purchase_basis,
    pla.category_id,
    -- pda.item_description,
    haou.name organisation, --10.0.0.3
    pda.sum_quantity_billed sum_quantity_billed , --10.0.0.3
    gcc1.CONCATENATED_SEGMENTS,
    gcc2.CONCATENATED_SEGMENTS
    from po_headers_all pha,
    po_vendors pv,
    pa_projects_all ppa,
    hr_all_organization_units haou,
    (select po_header_id,
    sum(quantity * unit_price) sum_amount_ordered,
    org_id,
    purchase_basis,
    category_id
    -- pla.item_description,
    from po_lines_all
    group by po_header_id, org_id
    , purchase_basis,
    category_id
    -- pla.item_description
    ) pla,
    (select pla.po_header_id,
    pda.project_id,
    sum(pda.quantity_ordered) sum_quantity_ordered,
    sum(pda.quantity_delivered * pla.unit_price) sum_amount_received,
    sum(pda.quantity_delivered) sum_quantity_received,
    sum(pda.quantity_billed) sum_quantity_billed, --10.0.0.3
    accrual_account_id
    from po_distributions_all pda, po_lines_all pla
    where pla.po_line_id = pda.po_line_id
    group by pla.po_header_id, pda.project_id,accrual_account_id
    ) pda,
    (select po_header_id, charge_account_id,
    -- rsh.receipt_num,
    min(rsl.creation_date) date_receipt
    from rcv_shipment_lines rsl
    where rsh.SHIPMENT_HEADER_ID=rsl.SHIPMENT_HEADER_ID
    group by po_header_id,charge_account_id
    ) rsl,
    (select distinct aia.invoice_num, pda.po_header_id , aia.invoice_date --10.0.0.3
    , aia.creation_date , sum(aida.amount) amount
    from po_distributions_all pda,
    ap_invoice_distributions_all aida,
    ap_invoices_all aia
    where pda.po_distribution_id = aida.po_distribution_id(+)
    and aia.invoice_id(+) = aida.invoice_id
    Group by
    aia.invoice_num, pda.po_header_id , aia.invoice_date --10.0.0.3
    , aia.creation_date) aia,
    (select haou2.organization_id, haou2.name
    from fnd_flex_value_sets ffvs,
    fnd_flex_value_norm_hierarchy ffvnh,
    fnd_flex_values_vl ffvv,
    hr_all_organization_units haou1,
    FND_FLEX_VALUE_CHILDREN_V ffvcv,
    hr_all_organization_units haou2
    where ffvs.FLEX_VALUE_SET_NAME = 'CAP_CODE_BU'
    and ffvs.FLEX_VALUE_SET_ID = ffvnh.flex_value_set_id
    and ffvnh.parent_flex_value like 'PO%'
    and ffvv.FLEX_VALUE_SET_ID = ffvnh.flex_value_set_id
    and ffvv.FLEX_VALUE between ffvnh.child_flex_value_low and ffvnh.child_flex_value_high
    and substr(haou1.name, 1, Instr(haou1.name, '-')) =
    substr(ffvv.DESCRIPTION, 1, Instr(ffvv.DESCRIPTION, '-'))
    and haou1.organization_id = fnd_global.org_id
    and ffvcv.parent_flex_value = ffvnh.parent_flex_value
    and ffvcv.flex_value_set_id = ffvs.flex_value_set_id
    and substr(haou2.name, 1, Instr(haou2.name, '-')) =
    substr(ffvcv.DESCRIPTION, 1, Instr(ffvcv.DESCRIPTION, '-'))
    union --10.0.0.1
    select f.organization_id, f.name --10.0.0.1
    from hr_all_organization_units f --10.0.0.1
    where f.organization_id = fnd_global.ORG_ID --10.0.0.1
    ) bu
    , po_line_locations_all plla --10.0.0.4
    , gl_code_combinations_kfv gcc1
    ,gl_code_combinations_kfv gcc2
    where pv.vendor_id = pha.vendor_id
    and pla.po_header_id = pha.po_header_id
    and pda.po_header_id = pha.po_header_id
    and pha.po_header_id = rsl.po_header_id(+)
    and pda.project_id = ppa.project_id(+)
    and pha.po_header_id = aia.po_header_id(+)
    and aia.po_header_id = pha.po_header_id
    and pla.org_id = haou.organization_id
    and pha.authorization_status in ('APPROVED', 'OPEN')
    and plla.po_header_id = pha.po_header_id --10.0.0.4
    and plla.closed_code in ('APPROVED', 'OPEN', 'CLOSED FOR INVOICE', 'CLOSED FOR RECEIVING', 'CANCELLED') --10.0.0.4
    and bu.organization_id = haou.organization_id
    AND gcc1.code_combination_id = pda.accrual_account_id
    AND gcc2.code_combination_id =rsl.CHARGE_ACCOUNT_ID
    In the following query I have commented receipt_num using the table rcv_transaction_headers.
    If I uncomment it the query results huge number of unexpected report.
    How can I add receipt number to the following query?
    Should I use rcv_transactions. If yes, what would be the join conditions.
    Kindly help as its urgent.
    Thanks in advance.
    Regards
    Avijit

    Sandeep is correct. I don't have time to tell you the correct query, but mine is something like this based on Sandeep's information:
    SELECT rsh.receipt_num
    FROM   rcv_transactions      rcvt,
           po_lines_all          pla,
           rcv_shipment_headers  rsh
    WHERE  rcvt.shipment_header_id   = rsh.shipment_header_id
    AND    rcvt.PO_LINE_ID          = pla.PO_LINE_ID
    AND    pla.item_id              = (select distinct inventory_item_id
    from mtl_system_items
    where segment1 = '1216107-2')

  • How do I change the placement of the page number in the footer?

    Hi,
    I am using Framemaker 8.  I am making some adjustments to the master pages.  For example, I've made the margins more narrow.  I have a footer that has a line above it.  The page number in the footer should be in line with the end of this line (the page number should be just below the end of the line above it), but now it is not.  How can I move the page number over so that it is lined up with the line above it?
    Thank you for your help!
    Erin

    Erin,
    The surefire technique that I use is to open the master page and select the text box you want to adjust by using Ctrl+left mouse click.
    Then right click and select Object Properties to open the Custom Text Frame box. Adjust the width, height, top, and bottom values to set the size and position of the box precisely and then click Set. If you have several master pages for different purposes, this technique ensures that all similar text boxes are positioned accurately.
    For the text box containing your footer, click on the text inside the text frame and right align it by selecting the Text Alignment button in the toolbar and selecting Right for right-justified.
    If it doesn't line up with the end of your bottom rule, open the Custom Text Frame box and adjust the left and top settings.
    Yours,
    Michael F
    =======

  • Pdf reader that will let me print the current page number to stdout ?

    I'm looking into annotating my readings, and it'd really speed things up if I were able to get the current page number printed to stdout.
    I've been through evince and xpdf's manuals, the latter will let you output the file to ps, so there might be some hacking possible there, but maybe there is a more convenient alternative...?
    Would appreciate some suggestions.
    Cheers !

    Sure that works, it's just that I'm already wrapping my pdf reader in a ruby script to allows me to make annotations linking back to the original document and page, and I also use the clipboard to quote.
    So instead of being a keybinding away, I end up have to juggle with windows...

Maybe you are looking for

  • Issue when synchronizing my SUP

    Hi guys, Context : MP (Windows Server 2008 R2) + WSUS 3.0 SP2 I add the SUP role on my Management Point specifying that it has to be synchronized from Microsoft Update. When I launch the Synchronize Software Update button, I open the WCM.log to check

  • My adobe flash player is out of process , shockwave flash keeps crashing how do i fix it?

    my adobe flash player is out of process , shockwave flash keeps crashing how do i fix it?

  • Leopard 10.5.6 partially unresponsive.

    Dear All: Leopard has developed some problems these past 2 days. One of the things I first noticed was the fact that I couldn't drag and drop files between two locations (as in copying files). I tried draging and dropping files from my desktop to ano

  • Using GAF within OIF?

    Is it possible to have a Web Dynpro Application configured using OIF and have a page configured with OIF that has a button that calls a popup that is then configured in GAF? So the pop up would then have a new page with a new logic flow. So the popup

  • Virtual Copy Not Added To Current Collection

    I'm looking at a standard (not smart) collection of images.  I want to create a virtual copy and have that copy automatically become a part of the collection I'm looking at.  This was the standard behavior in LR2.  Under LR3 I have to create a virtua