Skip to Main Content

Saturday, May 2, 2020

Configuring AOP as Print Server in Oracle APEX 20.1

APEX Office Print (AOP)

One of the new features in Oracle Application Express (APEX) 20.1 is the integration with APEX Office Print (AOP).

 

In this blog post, I want to cover what this integration means and how you can set up and use AOP in APEX 20.1.
 

Background printing/exporting in Oracle APEX

Oracle APEX 3.0 introduced the ability to export a report region to PDF - essentially, printing a report. This is defined declaratively and is available for all report regions. You can view and print reports with page headings and footers that repeat on each page and content that properly conforms to various page sizes. To accomplish this, report data is transformed into PDF format using an externally defined report server. In the early days, this external report server was Oracle BI Publisher or an External Apache FOP server. Later, when ORDS came out, an FOP server was included as an option.
 
I believe that the External Apache FOP wasn't used much, as it was too complex to set up and use. BI Publisher was used by people who were able to pay for the (huge) license or who already had it in their company. In my experience, ORDS was the most used Print Server. But, in the ORDS 18.4 release notes, it was announced that the built-in FOP server would be deprecated and with ORDS 19.4, FOP was taken out completely.
 
This meant people needed to stay on an earlier version of ORDS or use something else...


About APEX Office Print (AOP)

APEX Office Print (AOP) has been around for more than 5 years and makes exporting and printing from Oracle APEX easy and affordable. Based on templates you create in Word, Excel, Powerpoint, HTML, and Text, AOP merges data coming from APEX regions, data from the database, or even external data with templates in the defined output format for example PDF or any of the template formats. In the last years, AOP has gained a lot of popularity and has become the go-to printing engine for Oracle APEX projects.

Last year Oracle announced they would build an integration with APEX Office Print directly in APEX and with APEX 20.1 this has now been made available. In this first iteration, AOP serves as a replacement for the FOP server, in future Oracle APEX versions, more AOP integration is planned.


Configuring AOP in Oracle APEX 20.1

To configure AOP as your Print Server, log in to the INTERNAL workspace and go to Instance Settings:


Click on Report Printing and select APEX Office Print as the Print Server:

 

Fill in the host address where the AOP Server is running. AOP can run in the AOP Cloud as configured above, or the AOP Server can run locally (on-premises). You can get a FREE Cloud subscription on apexofficeprint.com or you can download the on-premises version. Make sure you are running AOP 20.1 or above, and for the Script, you enter /apex/

That's it! In APEX 20.1 you configure the Print Server on the instance level. In APEX 20.2 it's planned for you to be able to override these settings on the workspace level, so in case you have different AOP Servers or Cloud accounts for different projects, you can define them there.


Using AOP in Oracle APEX 20.1

To see the native integration of AOP in action, you can go to any Classic Report or Interactive Report and hit the Print or Download to PDF link.

The Print link in a Classic Report:


The output will look something like this:


You can customize the output in the Print Attributes of the Region:

 

You have the same feature when clicking Actions > Download > PDF in an Interactive Report
 


This is the basic integration of AOP in Oracle APEX, which mimics what ORDS, BI Publisher or an External FOP Server provided.

APEX Office Print can actually do much more than the above. AOP can print one or more Interactive Reports exactly as you see it on the screen, including highlights, breaks, filters etc. It can also combine IRs with IGs and Classic Reports and even charts all in a custom template you provide.

If you want this functionality, you still need to use the AOP Plug-in or AOP PL/SQL API, just like you did before APEX 20.1. You can download that from the APEX Office Print website.

I strongly advise you to also install the AOP Sample App, as it showcases all the features AOP gained in the last 5 years. On every page, you can see how the example is being built and which template has been used.

 


What does the future bring?

As with any future plans, things are not yet set in stone, so safe harbor applies here... but the plans are that APEX Office Print (AOP) will be further integrated with Oracle Application Express (APEX).
In APEX 20.1 you can download to PDF, but as AOP can also export to Word and Excel, it makes sense to give you this functionality too. Further on AOP comes with many other features, we will see how we can make those available to you in an even easier way :)

In another blog post, I will talk about the difference between native PDF printing which was introduced in APEX 20.1 and the AOP integration.

Happy exporting and printing!


Author: Dimitri Gielis
View original post here

Pagination

Comments

No comments yet on this post