How to use PAGEPOPUP with FOP in the Page

How to display a PDF (FOP Control) in “PAGEPOPUP” mode?

I have problems with POPUP blockers of browsers.

Thank You.

Geraldo Valencia

Hi Geraldo,

in the current versions we added a switch “usepagepopup” to the cisconfig.xml, which advices the NJX framework to use page pop-ups for all NJX modal dialogs.

But PDF documents are still opened in own browser windows. Showing documents automatically in page pop-up is something not all our NJX customers like. That’s why we did not include it in the “usepagepopup” switch for the NJX modal dialogs.

The answer to your question: Currently there is no configuration setting to open PDFs of the FOP Control in page pop-ups. But your question made clear, that there is a need to avoid browser windows for documents.

Best Regards,
Christine

Thank you Christine for your help.

Best Regards!!

For those who would like to learn more about PDF support, here are some hints:

NJX supports 2 ways to use PDF with Natural for AJAX:

  1. REPORT control (see the Natural for AJAX documentation):
    That’s the way which requires more programming on the Natural side. You have to fill the report yourself at runtime.
    The njxdemos contain an example for this: Start the njxdemos and select Reporting/Report.

  2. Adapter Listener (com.softwareag.cis.server.adapterlistener.PDFFOPListener)
    That’s the way which requires nearly no programming on the Natural side. You do the report design at design time: Create an PDF Print Form layout in Layout Painter.
    NJX812 contains an example for this. Since NJX812 is not available yet, please find attached a simple example to get started:

Explanation:

  • The PDF_FOP_Demo.xml is a normal NATPAGE layout in which the Adapter Listener com.softwareag.cis.server.adapterlistener.PDFFOPListener is set.
  • PDF_FOP_Demo_fop.xml is a PDF Print Form. It is bound to the NATPAGE via naming conventions: same name + “_fop”
  • The texts in the print form are also directly bound to fields in the NATPAGE via naming convention: Search for example for “fromFirstName” in both layouts.

How to run it:

  • Copy the 2 attached layouts
  • Do the Natural Adapter/html generation in the usual way
  • For PDF_FOP_Demo_fop.xml no Natural Adapter will be generated because it is a PDF Print Form.
  • For PDF_FOP_Demo.xml an Natural Adapter PDF-8.NS8 will be generated
  • Generate a corresponding Natural Programm for PDF-8.NS8 in the usual way.
  • You do not have to write any code: Simply run your main program, enter some values and press the “Generate Invoice” button.

Hi David,

in your post you simply copied the text from my earlier post PDF/FOP with Natural For Ajax - Adabas-Natural - Software AG Tech Community & Forums
without adding any comments from your side.

What was your intention? Was it to add a link to my earlier post? Or did you find a way to open FOP pages as PAGEPOPUPs?

Best Regards,
Christine