# How to use PAGEPOPUP with FOP in the Page

**URL:** <https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX, Natural-on-Windows-Unix\
**Created:** [June 28, 2016, 6:31pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315 "2016-06-28T18:31:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geraldo\_Valencia1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/geraldo_valencia1/32/1217_2.png) [@Geraldo\_Valencia1](https://techcommunity.softwareag.com/u/Geraldo_Valencia1)\
**Post date:** [June 28, 2016, 6:31pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/1 "2016-06-28T18:31:00Z")

</div>

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

I have problems with POPUP blockers of browsers.

Thank You.

Geraldo Valencia

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [June 30, 2016, 11:29pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/2 "2016-06-30T23:29:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Geraldo\_Valencia1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/geraldo_valencia1/32/1217_2.png) [@Geraldo\_Valencia1](https://techcommunity.softwareag.com/u/Geraldo_Valencia1)\
**Post date:** [July 26, 2016, 8:23pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/3 "2016-07-26T20:23:28Z")

</div>

Thank you Christine for your help.

Best Regards!!

---

<div class="post-metadata">

**Author:** ![David\_Stephan](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@David\_Stephan](https://techcommunity.softwareag.com/u/David_Stephan)\
**Post date:** [November 3, 2016, 3:55pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/4 "2016-11-03T15:55:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Christine\_Zimmermann](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Christine\_Zimmermann](https://techcommunity.softwareag.com/u/Christine_Zimmermann)\
**Post date:** [November 4, 2016, 10:25am UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/5 "2016-11-04T10:25:06Z")

</div>

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](http://tech.forums.softwareag.com/techjforum/posts/list/22588.page)  
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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:36pm UTC](https://techcommunity.softwareag.com/t/how-to-use-pagepopup-with-fop-in-the-page/189315/6 "2021-04-02T15:36:22Z")

</div>


