PL/PDF or AOP which should I use?

Rodrigo Mesquita Sep 22, 2020 2:37:13 PM
Find out how we can help you build solutions using Oracle APEX with our award winning application development and consultancy services.
Book a meeting with an Oracle APEX expert

APEX is a low code platform, which allows us to develop web applications using pre-built declarative features on top of the Oracle database. The tool covers almost every need but the native PDF document printing available from APEX 20.1 only exports the APEX native reports.

Many apps rely on some kind of document generation, so we currently have to look to third-party solutions. There are many out there, but this document covers the two solutions that we use: Apex Office Print and PL/PDF.

Both tools generate documents based on a docx template. In AOP, this template usually is stored on the APEX application static files, but also can be stored in a table, file server or even use an online storage server like google docs, while in PL/PDF you just need that docx file to generate a package, which is then used to generate the document.

What documents can we produce?

PL/PDF can generate DOCX, PDF and XLSX documents. For each type of document, you need a specific package. AOP generates DOCX, XLSX, PPTX, HTML, and text documents. We can specify the type of document at runtime, which makes it much easier to switch between them.

How it integrates with APEX?

AOP uses custom APEX plugins to generate documents; these plugins have specific versions for each APEX version, which is something that we need to be aware  of when upgrading the app. There is also an option to run the report directly from a PL/SQL API. PL/PDF does not use APEX plugins and like AOP, instead it generates documents using a PL/SQL API directly from the database.

Can we print APEX components?

PL/PDF does not have a native feature to print APEX components. It is possible but requires further custom development. AOP uses plugins to generate documents from interactive grid and interactive reports. AOP also has an option to export APEX charts and create Native Office Charts. PL/PDF can generate charts from the PL/SQL API.

Do they support HTML?

AOP Supports HTML and the Rich Text Editor (to generate HTML) which can then be exported to PDF.

PL/PDF supports the conversion of xHTML to PDF documents.

Can we use these in the cloud and on premise?

PL/PDF can be used on any Oracle database in the cloud or on premise. The procedure to install and use the product is the same no matter where you install it and it consists of a number of PL/SQL packages that are installed into a new database schema.

APEX Office Print consists of an APEX plugin and a PL/SQL API, which are installed into APEX and the database, then called to create the reports. The plugin and the API call out to the APEX Office Print server, in the Cloud for subscription models, or to your own local version for the on premise-licensed version.

So you can easily use APEX Office Print both on premise and in the cloud using either licensing model (though to have an on premise AOP and cloud based database would be a slightly more complicated architecture).

How much do they cost?

PL/PDF is priced between €500* for a perpetual license for one server to €2000* for an enterprise perpetual license. Once you have installed PL/PDF (on cloud or on premise) you can print as many documents as you like. There is no ongoing cost, but you can purchase additional support. A trial version is available which lets you use the whole range of PL/PDF functionality, but prints are limited to 5 pages and includes a watermark.

APEX Office Print is priced in four tiers with different options available on each tier for cloud and on premise services:

Free / Bronze

  • Cloud – Free

 

All features available, unlimited development reports and 30 full reports per month. Additional reports are priced at €0.20* per report.

  • On Premise – €2950* one-time cost

 

PDF and Word printing available. Can be used on 2 servers.

Silver

  • Cloud – €35* a month

 

All features available, unlimited development reports and 1000 full reports per month.

Email support available.

  • On Premise – €6900* one-time cost

 

PDF, Word and Excel printing available. Can be used on 2 servers.

Gold

  • Cloud – €59* a month

 

All features available, unlimited development reports and 2250 full reports per month.

Email support available.

  • On Premise – €9500* one-time cost

 

PDF, Word, Excel, PowerPoint, Text/Markdown and HTML5 printing available. Can be used on 2 servers.

Enterprise

  • Cloud – €350* a month

 

All features available, unlimited development reports and 35000 full reports per month.

Email support available.

  • On Premise – €24900* one-time cost

 

PDF, Word, Excel, PowerPoint, Text/Markdown and HTML5 printing available. Can be used on 6 servers. Also includes online support and a half day AOP training course.

As you can see, there are a range of different pricing options for each tool, and both offer a free development environment, so there’s no reason not to try out both!

*Price quoted, based upon pl/pdf and AOP web site pricing @ 7th August 2020

How easy are they to use?

AOP is definitely the quickest way to create reports in APEX. There is lots of thorough documentation located here (https://www.apexofficeprint.com/docs/) and even a demo APEX app that lets you see how the end result can work in APEX (https://www.apexofficeprint.com/ords/aop_web/r/aop_sample_app_web)

Report templates are created in Microsoft Word and tied to APEX page items to produce PDF reports.

PL/PDF is a little more daunting. The installation is straight forward (install a new schema and fill it with objects) but after that you need to work through the less detailed documentation (https://www.plpdf.com/support-docs.php) and example scripts. This tool has been around a long time and resides in the database, so there is no documentation specifically related to Oracle APEX.

While the learning curve is steep, you can create any output you like using existing PL/SQL skills once you have the hang of it. There are a number of APEX specific blogs around the use of PL/PDF on our website here to help you get started: https://explorer.co.uk/?s=plpdf

The reports templates can also be created in Microsoft Word, but in my experience, the generated report packages should then be used as a starting block to build your final report on using PL/SQL.

Conclusions – which would we use and when?

PL/PDF and Apex Office Print are both excellent tools and could each be used depending on your situation.

If you want to quickly create documents or you want your users to be able to build their own reports, then AOP is the tool of choice. Non-technical users can easily create reports and they can be implemented into an APEX app in no time at all.

For a pixel-perfect PDF reports, complete control and drive content using PL/SQL then PL/PDF is the one to select; you also then have the advantage of your reporting engine residing in the database, which makes APEX upgrades easier and you are not tied to an external tool.


Need some help with your APEX applications? Speak to the experts today.
Book a meeting with an Oracle APEX expert

Author: Rodrigo Mesquita 

Job Title: Oracle APEX Development Consultant

Bio: Rodrigo is an Oracle ACE and APEX Developer Expert certified by Oracle and is an experienced software engineer with emphasis in analysis, design and development of bespoke Oracle applications utilising development tools such as PL/SQL, APEX and Forms for a variety of international businesses. Rodrigo speaks regularly at Oracle community events and enjoys creating APEX plugins and writing blogs.