0% found this document useful (0 votes)
298 views17 pages

PDF Generation Using PLJRXML2PDF and Jasper

printing in oracle apex and jasper

Uploaded by

contactez23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
298 views17 pages

PDF Generation Using PLJRXML2PDF and Jasper

printing in oracle apex and jasper

Uploaded by

contactez23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

APEX – PDF GENERATION

USING PLJRXML2PDF &


JASPER REPORTS
Gaspar Gonzalez
[email protected]
Twitter: @GasparYYC
Blog: http://gasparyyc.strikingly.com/
AGENDA

• Introduction
• Problem Statement
• Possible Solutions
• Exploring pljrxml2pdf as a solution
• Demo
• Q&A
INTRODUCTION
• I am an IT Professional that has had a number of positions in the Oil&Gas
industry as DBA, Solution Architect, EA, Development Team Lead, ERP
Architect, etc.
• I have used APEX since it was called HTMLDB but always for prototyping
only
• I am restarting my career doing APEX development…
PROBLEM STATEMENT
prob·lem
/ˈpräbləm/
noun
1. A matter or situation regarded as unwelcome or harmful and needing to
be dealt with and overcome.
synonyms: difficulty, trouble, worry, complication, difficult situation;
snag, hitch, drawback, stumbling block, obstacle, hurdle, hiccup, setback;
PROBLEM STATEMENT
• Historically the act (or art as I called it once) of printing has been a
challenge…
• First hand experience with printing from Oracle Forms&Reports and Pro*C
was very difficult since Drivers, Operating Systems and Hardware were not
“in-sync”
• Inconsistencies in printing methods were common..
• A few years later and thanks to Windows OS and MacOS components have
been homologated.. E.g. hardware is now PCL (or similar) compliant, etc..
• Printing languages have existed but each had a niche in a particular
platform
PROBLEM STATEMENT
• Adobe with their Portable Document Format (PDF) successfully worked
on different Operating Systems and Platforms
• Standardization of a Document format has been a challenge due to
copyrights and protectionism...
• In 2008 Adobe handed over the full specifications to the ISO (ISO 32000-1)
and this is when PDF became the de facto standard for Electronic
Documents worldwide
PROBLEM STATEMENT
• And speaking of printing…
• Printing has been greatly improved with APEX 4.x and up
• Finally you can generate a PDF document out-of-the-box !
PROBLEM STATEMENT
• But the real problem is that you are somewhat limited to what the PDF
generation on APEX can do
• Requirements can easily surpass the capabilities, especially for reports that
need to rely on a template like invoices, images (e.g corporate Logo),
conditional printing, dynamic reports, etc.
PROBLEM STATEMENT
• To enable PDF printing with those features you will need something more
than the basics…
• Your options are (you will need one)
• Oracle REST Data Services (ORDS) (Included in APEX – Basic Printing)
• External (Apache FOP) (Open Source – Apache License v2 – You need to be crafty)
• Oracle BI Publisher (Commercial License – Oracle pricing – You need to be rich)
POSSIBLE SOLUTIONS
pos·si·ble
(pŏs′ə-bəl) adj.
1. Capable of happening, existing, or being true
without contradicting proven facts, laws, or circumstances
2. Capable of becoming or of being made to be so; potential
3. Capable of happening but of uncertain likelihood
POSSIBLE SOLUTIONS
• There are a number of solutions for printing:
• Oracle BI Publisher
• http://www.apexofficeprint.com/
• http://www.apex-reports.com/
• http://xmlgraphics.apache.org/fop/
• http://community.jaspersoft.com/project/jasperreports-library
• http://community.jaspersoft.com/project/ireport-designer
• I’m sure there are many others
• Some free and some not…
POSSIBLE SOLUTIONS
Based on the requirements I decided to use:
• Pljrxml2pdf : As the engine to generate the PDF document
• https://sourceforge.net/projects/pljrxml2pdf/

• iReport: As the front end tool to generate the needed XML


• http://community.jaspersoft.com/project/ireport-designer
EXPLORING PLJRXML2PDF AS A SOLUTION
High level description of Workflow:
• iReport is the application that creates a template using drag-drop
features, preview, etc...
• Once the template is complete, generate the corresponding XML and
load it in a table
• Then a PL/SQL call (part of the PLJRXML2PDF package) puts it all together
to render the report for the application(s)
EXPLORING PLJRXML2PDF AS A SOLUTION
• Pros:
• Components are Open Source, free and easy to use
• They’ve been on the market for years, they’re stable
• Cons:
• No commercial support
• Limited number of Fonts
• Limited languages and character sets (UTF8)
• Limited chart types
• iReports needs Java 1.7 (won’t work with 1.8)
DEMO
dem·o
ˈdemō informal
noun
1. a demonstration of a product or technique.
"staff members gave a demo of the technology"
Q&A
Q and A
n.
1. A format for presenting information consisting of a series of
questions followed by their answers
2. The part of a meeting or presentation during which someone
answers questions from people in attendance
END OF PRESENTATION

Thank you for your attention..

You might also like