Dimitri Gielis Blog

Subscribe to Dimitri Gielis Blog feed
I created this Blog to share my knowledge especially in Oracle Application Express (APEX) and my feelings ...
Updated: 3 days 12 hours ago

More info on Oracle Always Free APEX upgrades

Sun, 07/05/2020 - 16:12
This post is a continuation of the series of blog posts on the Best and Cheapest Oracle APEX hosting: Free Oracle Cloud.
With the release of APEX 19.2 you couldn't really decide when Oracle would upgrade your APEX version in the Always Free Oracle Cloud. But this is now changed. From now on you can decide when Oracle upgrades your Oracle APEX version.
This is the email I received a few days ago:

If you do nothing your APEX instance will be upgraded as soon as possible, but you can decide to defer the update up to 45 days.
In order to check what the settings are on your instance, log in to your Oracle Cloud account.

Go to Autonomous Transaction Processing and click on your database, in my case DBDIMI. From there click on Tools and hit Open APEX: 
 You might have a direct link to your Oracle APEX instance, you can click on that too.
Login to your INTERNAL workspace, with the ADMIN user:

On the right-hand side it will tell you when an update is being done for Oracle APEX:

By default, it will update automatically when Oracle APEX is made available for your platform.But if you click on the gear icon you can change it:

Here I changed it to defer the update, up to 45 days this can be done before it performs the upgrade automatically.


You find some more frequently asked questions in this blog post

Oracle Always Free Oracle Database upgrades

Mon, 06/01/2020 - 09:46
This post is a continuation of the series of blog posts on the Best and Cheapest Oracle APEX hosting: Free Oracle Cloud.

During APEX@Home I presented "Bringing the light in your Always FREE Autonomous Cloud".
You can watch the recorded presentation or look at the slides. During my presentation, I mentioned how to upgrade the database version you are on, opt-in, or wait for Oracle to upgrade your instance automatically. As I received an email today, I thought to write a quick blog post about it.

Oracle comes with new releases of the Oracle Database yearly and for Oracle Application Express (APEX) even twice a year. The Oracle Autonomous Cloud will upgrade the instance by itself, both for the database as for APEX. You don't really have control when this happens, but Oracle will let you know. This email I received today:


BUT, if you are really eager to get the newer functionalities sooner, this blog post shows you how.

When you log in to the Oracle Cloud and go to the details of your Autonomous Database Cloud, you will find under Actions - Create Clone.


Cloning is a great way to copy your entire instance and try different things with it. When doing for example a new project, you can start with the always free service and when development is done, clone the instance as a production instance. You can choose to have another free cloud or upgrade to a paid service.

In this case, I will use the Clone feature to upgrade my database to 19c myself.

You can do a full clone or metadata clone. I typically use a full clone, so all is there, tables, data and Oracle APEX apps.


When you clone, depending the time you have an option to select the database version. Today I could only select the 19c version, which is exactly what I wanted:

Hitting the Clone button and the instance is provisioned:


It takes a couple of minutes to complete but after that, there it is, your upgraded instance... well it's not really upgraded as you have both an 18c and 19c version now.


I confirmed the database with all my data and all my APEX workspaces and apps where there :)

Pretty cool!

Today United Codes changes the way you look at your Oracle APEX apps

Wed, 05/20/2020 - 13:24
This is a day I've been looking forward to for two and a half years.

Every once in awhile, a revolutionary product comes along that changes everything ...

... and United Codes has been very fortunate. It's been able to introduce a few of these into the Oracle APEX world.

In 2015, we introduced APEX Office Print; it didn't just change the way we export and print data; it changed the entire mindset on how to present data.

In 2019, we introduced APEX Media Extension; it didn't just replace Oracle Intermedia; it changed the way we deal with media in APEX.

Well, today, we are introducing three revolutionary products for Oracle APEX:
  1. an automated documentation generation tool
  2. a monitoring tool
  3. a quality assurance tool
An automated documentation generation tool, a monitoring tool, and a quality assurance tool ... these are not three separate products, this is one tool, and we are calling it ... APE - APEX Project Eye.




You might recognize the above ... this is how Steve Jobs announced the iPhone. For me, one of the best presentations I've seen. Of course, APE is not the new iPhone, but I strongly believe that APE will change the way we deal with Oracle APEX applications. Let me tell you why...


Automated Documentation Generation

Nobody likes to write documentation. In most cases, documentation is written at the end of a project and because someone forces you to do it. It takes days to write and to decide what to include and what to leave out. It's not always clear why you even write the documentation. Maybe it's because you want to remind yourself of some functionality. In most cases, however, you write it to help other people understand the project. The day it's written, it's already outdated, as things change. Documentation is hardly ever being maintained or even able to be located when needed. In short, it's just a pain.

When you follow a few good practices during development of your Oracle APEX app, APE will do the documentation part for you! You will have always easy to find and up-to-date documentation. The person looking at the documentation can decide what they want to see and what they want to dive deeper into.

You can define a project in APE and specify which applications belong to this project. You can specify some background of the project, but the real power is that APE reads the Oracle APEX meta-data. APE also allows you to change the help and comments directly inside the APE interface. If you follow the APE guidelines on how to write comments for your database objects and procedures and packages, you are golden. APE reads all that info too and presents in an easily digestible format.



And in case you want to export the documentation, you can do it with one click as we have integrated APEX Office Print (AOP) with it. Select the different sections you want in the document, chose the format (HTML, Markdown, PDF), and hit the print button. 

Monitoring

If I asked you, how many workspaces and applications do you have in your Oracle APEX instance? And from those applications, how many are currently in use, and who is using them? Are things running smooth or are your users receiving many errors? Would you know?

I didn't.  And almost all companies I'm called into have only a rough idea of what apps are running. In one company that I visited a few months ago, they asked me to document all the apps that were running and who was using them... the people who managed their Oracle APEX apps were replaced a few times, and they just had no idea anymore.

When you create an Oracle APEX app today, you can specify a feature called Activity Reporting, which gives you a decent overview of that specific application. But I always wanted more than that.

I wanted a holistic overview of my Oracle APEX instance. Show me in the entire instance -  what is going on, which workspaces and applications are still being used, how much, and by who. But also let me drill-down into a specific app and get detailed insight into which pages are being used the most, where errors are happening, and how the performance is. I'm not only interested to see numbers, but I want to know that today things are running better than yesterday or the week before. APE will show you exactly that, in a clean and easy to use interface.



This dashboard gave us so much insight into our own environment. It showed me not only do I have to fix some bugs in applications I wrote many years ago, but also that I might need to look at some queries as performance isn't always that good and probably is slowing down my database at times. It also showed me which applications are important and being used on a daily basis and by whom.

And that company who asked me to document their Oracle APEX environment? I just installed APE and the management now has an always up-to-date view of their environment.


Quality Assurance

You start the project by creating a data model. Next, you create the Oracle APEX app, show the customer, make changes in the data model, and the APEX app and you iterate like this a few times. At least this is how the start of a typical project looks like for me.  For other companies it might look a bit different, perhaps a bunch of consultants comes in, which work on an APEX app, do some handover, and leave.

The hardest part is keeping an eye on the relationship between the database objects and your APEX components. Which database objects are still being used? Which APEX pages are still being used? And oh boy... we are two years later and I have to make a change in this table, what's gonna break?

Another part I always found challenging is to know if how you built the application and intended it to be used, if that is also how people actually use the app. It was only by people showing me their workflow that I could effectively give them tips on how to better use the app... or actually, improve the app so it was more obvious for the end-user what was expected.

So what I understand under quality assurance tool; is a tool that helps you to code well, that gives you a clear view of the database objects, the APEX components, the relationship between them, and visibility in the usage of the app, so you have all you need to do an amazing job.

APE will not only give you insight into all the components but regardless of how you look at it, you get the picture! Either you start with the Entity-Relationship diagram and see the APEX components linked to it. Or you start with the Page Flow of your APEX app and drill back to the ERD. And finally APE has a visual that has never been done before, we call it the Session Flow. It's an amazing visual representation of how people actually use your app and how people navigate from one page to the other.


All of these views have given me insights into my own Oracle APEX apps, which I've never had before. We got insight into how people use our portals, we saw we had database objects which were not used at all and when we had to change a page, we knew what the impact would be on other pages linked to that page. It's an awesome feeling when you truly master your app.

APE - Your Second Screen

It's really cool to have an app with the above, but as developers, we are constantly in Page Designer when we create Oracle APEX apps, right? Wouldn't it be nice to have APE on a second screen and while you develop, APE gives you more information, like the database object dependencies of that page?

We thought that too ;) Click on the Eye in the Tree View and be amazed :)


The first time I saw the Live Insight feature, I couldn't stop smiling... you see instant database object dependencies, you see relationships of objects, links from other pages, it's all there. Seeing it is believing it!

Note: for some people, quality assurance is following naming conventions and good practices. And I love for example to use the APEX Advisor, as it does some checks for you. In a future release of APE, we also want to cover that area of QA and our plans are to include an advisor you can customize with your own checks.


And there's one more thing ...

We decided to make APE completely FREE for personal use! Head over to https://www.apexprojecteye.com and download APE today!

Let the EYE be with you! ~ Yoda

ORDS: The database user for the connection pool named |apex|rt|, is not authorized to proxy to the schema

Mon, 05/11/2020 - 20:38
When configuring some Oracle REST web services through Oracle APEX, I got confused, so I thought to quickly write down, so I don't forget for the future.
Although I use many ORDS web services in several schemas, for a new schema I got following error: "The database user for the connection pool named |apex|rt|, is not authorized to proxy to the schema named ."

I was confused, as I enabled the schema to be REST enabled.


It was only once I gave following permissions it worked:

alter user {USER} grant connect through APEX_REST_PUBLIC_USER;

There you go, it might help you too :)

A new look, a new name...

Sun, 05/10/2020 - 11:05
Last Thursday we gave a new look to our products APEX Office Print (AOP) and APEX Media Extension (AME). Not only did they get a new logo, but the whole website and portal were also put in a more modern, minimalistic look.


At the same time, we announced that our company APEX R&D would from now on, sail under the flags of United Codes.

With United Codes we want to bring all of our products and services together under this new brand.

In the coming weeks, we will announce two more products, which I can't wait to show you!
In our heart, we love the Oracle Database and Oracle Application Express (APEX), so both products will be in this area.

United Codes

This blog post isn't just to say we have a new logo and brand, but I want to share why I'm thrilled about our new brand "United Codes".

When I look at my life, there has always been a constant, I love to bring ideas into reality with code.

It can be something small, like when I was a teenager and I was in love with a girl instead of writing a card, I coded a program that would show her name and hearts. She never saw it, as it turns out she wasn't interested, but it gave me so much pleasure when I got the code to work.

Bringing ideas to life alone is nice, but doing it together with others is even nicer. Together you can do much more.

I remember a day at Oracle Open World (OOW) where there was a coding challenge. Initially, I wasn't going to participate, but the night before the deadline, Martin D'Souza and I said; "lets code together for one night and see where we end up". It wasn't the fact that we won which gave a lot of pleasure, it was working together to bring the idea we had to life.

Our AOP product is not any different. I had this idea to more easily get template-based reports out of Oracle APEX. I started on a prototype and got it to work, but it only became really awesome when more people started to work on it, especially Sunil Tandan. Not only did we work together on something, but it also became a shared dream.

In my consulting career in many cases the best results happened when there was a mixed team from business, coders, and people who just were passionate about bringing an idea to life.




The name UNITED CODES describes someone who is able to master the "code of the problem" aka the „input-code“ as well as the "code of the target" aka the „output-code“, and unites them by knowing the "code itself" which is the key concept and solution.

The logo is in principle the union of two opposites, as for example body and spirit find their union and center in the soul. At the same time, it can be read as a narrative from left to right and thus tells the story. As a whole, especially through its center, it can actually be seen as a heart, which is also the center in man and the seat of the soul, of enthusiasm and devotion. At the same time - at the level of the spirit - the center is an eye that unites opposites in its ability to see. Furthermore, the sign can also be seen more than twice as the letter "C", the initial letter of the word "code" denoting the "united codes".

There are many more codes than those of the programming languages used in computer science. Each area has its own code and each problem has to reveal its own code first before it can be recoded into a solution. Experts for the input codes may be mathematicians, engineers, system theorists, cyberneticists, game theorists, or physicists. Experts for output codes are computer scientists and full-stack developers as well as certain specialists for implementing the code.

2030

What excites you for 2030? Did you already think about that?

What excites me is to bring ideas to life. In the short run I want to focus on Oracle Database and Oracle APEX, as in my view, it's one of the best tools to bring data and ideas to life. Oracle's mission statement resonates really well with me: "Our mission is to help people see data in new ways, discover insights, unlock endless possibilities."

When you saw my VR presentation which I did two years ago, I already expressed my dream. I really believe the low-code development is at the start, I envisage we can build apps, just like Tom Cruise used his hands in Minority Report to get insight into his data:



During my research in this area, I believe the technology isn't advanced enough to go mainstream.
Although SpaceX already used it to design rockets, for coding inside a browser the technology wasn't good enough yet. This would be one example of how to bring ideas to life faster, but there are many other ways to achieve that.

I really love a quote from the movie Ratatouille which I slightly changed: 
"Not everyone can become a great coder, but a great coder can come from anywhere"

Many people have great ideas but lack the ability to bring it to life. With United Codes we can accelerate bringing ideas to life.

I want to finish this post by thanking the entire team at APEX R&D for all their efforts the last years to bring us where we are today. I couldn't wish for a better team and I look forward to starting this United Codes journey with them.

Configuring AOP as Print Server in Oracle APEX 20.1

Sat, 05/02/2020 - 08:18
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.

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!

Fix ORDS issue: No pools configured yet

Sun, 04/26/2020 - 07:14
In a previous post, I blogged how I do my Oracle APEX upgrade, and part of that is to copy ORDS.

But when I tried to start ORDS, I got the "No pools configured yet" in my logs. 

ORDS was running, but APEX wasn't accessible.
I spend my night looking at this, as I already had done so many ORDS installation and configurations, but still was puzzled with this... so thought to share the fix, even if it's just so I can remember the next time it happens ;)
Background:- My Oracle database is a CDB with multiple PDBs- For every PDB I have a separate ORDS running in standalone
When doing an upgrade of APEX I do:- Copy PDB called APEX_PDB to APEX[version]_PDB (e.g. APEX192_PDB)
For ORDS I did this:- Copy directory ords to ords192- In ords192, change ords.war to ords192.war, set the new path for the configdir and in the standalone directory change standalone.properties to serve a different port and path:

Doing the above, ORDS was running nicely but gave me the "No pools configured yet" error, which also means APEX wasn't accessible.
If in my standalone.properties I wouldn't change the path to /ords192 but keep /ords it worked just fine. But I didn't want that, as I'm used to use /ords[apex_version]
So what finally worked for me, was the following:- mv the ords directory to ords_old- create a new directory ords and unpack the ORDS zip- rename ords.war to ords192.war- set the config dir of ords192.war- run java -jar ords.war setup and follow the wizard- run java -jar ords.war standalone and follow the wizard- quit- open the standalone.properties file and change the standalone.context.path=/ords to /ords192- start ORDS again
To me, it seems a combination of renaming the war file first, setting config dir and make sure to change the standalone properties as the default in there is /ords

Oracle APEX 20.1 installed with only 2 mins downtime

Sun, 04/26/2020 - 06:33
Over the weekend I upgraded our environment to Oracle APEX 20.1.

I describe the process of installing a new version in the Safely Upgrading to Oracle APEX 18.1 blogpost. It comes down to cloning my current PDB, calling the clone the previous version of APEX, and then upgrade the current PDB to the latest APEX version.

This time I decided to not just run @apexins, instead, I wanted to try and minimize the downtime by following the steps described in the documentation under D Maximizing Uptime During an Application Express Upgrade.

Here're my notes, in case you want to maximize uptime.

During the first two phases, the Oracle APEX apps were still running:

SQL> @apexins1.sql sysaux sysaux temp /i/


SQL> @apexins2.sql sysaux sysaux temp /i/


The first two phases took about 7 minutes.
After phase 2, I stopped ORDS, and the downtime started for people wanting to use the Oracle APEX apps.

SQL> @apexins3.sql sysaux sysaux temp /i/


It completed in less than 2 minutes!

At the same time, phase 3 was running, I copied the images folder.
Note: you can also use the CDN by running @reset_image_prefix.sql after phase 3 and specifying: https://static.oracle.com/cdn/apex/20.1.0.00.13/

I ran the following command to allow APEX apps accessing, for example, AOP or other web services:

SQL> BEGIN
    DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
        host => '*',
        ace => xs$ace_type(privilege_list => xs$name_list('connect'),
                           principal_name => 'APEX_200100',
                           principal_type => xs_acl.ptype_db));
END;


And finally, I validated the ORDS config.

$ java -jar ords.war validate

I started ORDS again (running standalone), and the Oracle APEX apps were back online.

Very slick to do an upgrade with about 2 minutes downtime!

APEX Media Extension (AME) Publicly Available

Mon, 03/02/2020 - 16:43
After two months of beta testing, we have released the first production version of APEX Media Extension v20.1.

I'm extremely proud to bring our second product to the Oracle and APEX community.  With our first product, APEX Office Print (AOP), we wanted to make the Printing and Exporting of documents easy.  With APEX Media Extension (AME) we want to make the processing of media easy for any Oracle database and Oracle APEX developer!

We got the idea of doing this product when Oracle Intermedia/Multimedia became decommissioned in the Oracle database, but we still needed the manipulation of images in our projects. We did research on the best use of existing tools, but it always seemed we couldn't rely on any one tool and we needed different tools and custom code to come to a solution.
In our first release of AME, you will find the following features:
  • resize images
  • rotate and flip images
  • crop images
  • add one or more watermarks or overlays (images and text) to images
  • compress images
  • greyscale images
  • change image formats (jpg, png, ...)
  • get image information (width, height, mime type, ...)
  • read media metadata (Exif, IPTC, and XMP)
Just like with AOP, AME also comes with a FREE plan.

You can get started by downloading the software from the APEX Media Extension (AME) website.
The zip contains a PL/SQL API, an Oracle APEX Plug-in, and an APEX sample application.

Here's a short video which shows you AME in action:


The architecture of AME is very similar to the one of AOP. There's an AME Server that accepts REST requests. On top of the REST API, we've built a user-friendly PL/SQL API.
The APEX Plug-in is a bit different, as this plug-in is an enhancement of the Dropzone plug-in by Daniel Hochleitner. We customized the plug-in so the manipulation of the images is done in the browser before the media is sent to the server.

As we love our AOP customers, we decided to put AME in our upcoming AOP release! So when you upgrade to AOP v20.1 (Gold and Enterprise on-premises licenses), you can use AME too without needing to do a separate install :)

Just like with AOP, we will have a separate AME Roadmap and of course, your voice is important to us! So let us know what you would like to see.

Here's already a quick preview of what we currently have in the pipeline:
  • audio manipulation and metadata info
  • video manipulation and metadata info
  • online photo editor
So what's next?

I will do six blog posts with different use cases of AME, based on real-world examples, so you can see AME in action.

1. In our project for a flight school, we had to automatically create thumbnails and resize images.

2. An auction company wanted to allow people to upload pictures of the goods they want to sell, but every picture needs a watermark and stored on a specific location.

3. The Belgium Tennis Organization wants uniformity in images, so they store the original image and bring them to the same mime type, resolution and compression rate.

4. A photographer wanted to do analysis on his pictures; where it was taken (GPS location), if they used flash, which aperture it was set to etc. This meta data is stored with tags encoded using Exif, IPTC, and XMP.

5. Cavanti is allowing veterinarians to draw the issues a horse has directly on an image. So the final picture is overlain with different images.

6. A hotel in Belgium wanted to grayscale and rotate images

These posts will showcase the features of AME and the power it can bring to your projects. Try out APEX Media Extension (AME), we hope you enjoy it and feel free to let us know what you are searching for!

Free Oracle Cloud: 19. Oracle APEX upgrades (19.1 to 19.2)

Sun, 02/16/2020 - 20:16
This post is part of a series of blog posts on the Best and Cheapest Oracle APEX hosting: Free Oracle Cloud.

Many people wonder how you can upgrade your Oracle APEX version to the latest version in your cloud account. The short answer is: you can't...

Oracle is doing this for you, whenever they believe it is the right time to do. The idea is that at some point you can tell Oracle when it would be a good time to upgrade your APEX environment in a specified window, but today, that is not there yet.

I read that a few days ago Oracle upgraded the APEX release to 19.2 on the free cloud.

I didn't use my Always FREE Oracle Cloud account for a few weeks, so it was stopped.
I went in the Oracle Cloud console to start it again and up we go.


Through the Tools menu, I open APEX and logged in into my CLOUD workspace. But, to my surprise my APEX version was still 19.1.

I was doing a few things when suddenly I got "Application Express is being upgraded to a newer version":


When trying to open APEX from the console, I couldn't anymore.


I waited a couple of minutes and there it was ... APEX came back and was upgraded to 19.2:



So it looks like Oracle is checking your APEX release when you start your database and when it sees it's an older version, it will just upgrade. I thought that probably because my account was stopped, Oracle will try again in the maintenance window, but my experience learns it's not waiting on that window.

I'm glad Oracle upgraded APEX for me automatically, but it would be nice to have a log somewhere or some info that it will do this. Hopefully, this blog post will help people who only fire up their instance occasionally when doing a demo. It's best to do it a bit before so the upgrade takes place before you need your APEX instance.

Print PDF from Oracle APEX to Local or Remote Printer

Sun, 01/19/2020 - 19:33
On Twitter, I got a lot of reactions on my previous blog post Printing to local (Zebra) printer from Oracle APEX in the Cloud.


As more people asked the question of how to print to a local printer from Oracle APEX, I will cover 3 options in this post. All options make use of some features of APEX Office Print (AOP).

When you install the AOP Sample Application, you find the examples under the following sections:


1. Call Print Window of the browser directly from a button


Create a button on the page e.g. PDF and add a Dynamic Action to it. The Dynamic Action calls some JavaScript:


This JavaScript calls following AJAX Process, which uses the AOP PL/SQL API to generate a PDF:


When the PDF is produced, the printJS JavaScript function is being called, which opens the browser's print window. The end-user can change the Printer and hit the Print button.
So this option is not a direct print to a predefined printer, but a two-step process: open print window, hit print.

2. Print directly to an IP Printer

One of APEX Office Print's unique features is that the AOP Server can send a document directly to the IP address of a printer. AOP is really smart and if it sees the printer doesn't support native PDF or the document type we send, it will convert to PDF or Postscript, which all printers support.

The only thing you have to do, in order to print directly to an IP Printer is to add some global variables of AOP. In the below example it will send a PDF to the IP Printer on the same server AOP is running but on port 3000.


3. Use of Post-Process command

You can configure the AOP Server with some post-processing commands, which allow you to run some command-line tools before and after the AOP Server is creating the output. This is a really powerful feature and one use case is to send the document directly to a local (or network or remote) printer.


Just like with the IP Printer, you define the post-process command in some global variables of AOP.

This technique I also described in the previous blog post where we printed to a local Zebra printer. The only special thing in that post was that we used ngroc to make AOP known to the Oracle Cloud.
When you have the AOP Server running on-premises, you don't have that step as your APEX app will call the on-premises AOP Server. The only thing you need to make sure is that AOP Server knows the printer you configured in the post-process command.


There you go, three options to print from your Oracle APEX app directly to a local or remote printer using APEX Office Print.