Search code examples
oracle-databasepdfdatatablerdfconverters

From selected data into PDF using RDF file


I am currently trying to convert a simple table into a PDF file using an existing .rdf file.

My first approach was to look for a new program that can do so because I want to replace the current 'Oracle Reports' program. Is there any other program that would support converting SQL data into an PDF using an .rdf File?

I tried writing a Python 3 script to do just that, but I would not know where to start.


Solution

  • Oracle APEX 21.2 (latest at the current time) has a package named APEX_DATA_EXPORT that can take a SELECT statement and export it into various formats, one of them being PDF. The example in the documentation shows how to generate a PDF from a simple query. After calling apex_data_export.export, you can use the BLOB that is returned by the function and do whatever you need with the PDF.

    There are not very many options for styling and formatting the table, but Oracle does plan on adding additional printing capabilities for PDFs in the future.