Idea Summary
Many developers have faced limitations with printing in APEX, especially the default reliance on paid tools such as BI Publisher or APEX Office Print.
Although Oracle APEX provides a printing option through Native Printing, it is limited and does not allow flexible customization.
That’s why I developed a new mechanism based on Client-Side Printing using the jsPDF library. The key advantages are:
· No need to design a separate template for each report.
· Extremely fast report printing.
· Reduced time required for report design.
· Allows end-users to customize reports without needing developer intervention.
This mechanism now works universally on any Interactive Report Region:
· Whether the report is standard, aggregated, or a pivot table.
· Headers and footers are generated dynamically, with support for logos and flexible customization.
· Filter data such as From/To is automatically included in the printed report based on settings.
· A ready-to-use template system can be selected during printing, without binding each template to a specific report.
The result: A unified, flexible solution that eliminates the need for paid tools and provides developers and users with a professional printing experience directly within APEX.
If you’re an APEX developer looking for an easy and efficient way to print without extra costs, this solution will save you significant time and effort.
Use Case
· APEX developers struggling with default printing limitations or the cost of commercial tools.
· Projects requiring fast, customized report printing without designing separate templates for each report.
· Cases where end-users want to customize the printed report’s appearance (add a logo, modify headers/footers, show/hide columns) without developer intervention.
· Development environments seeking a unified solution that works on any Interactive Report (standard, aggregated, pivot table).
· The need to automatically include filter criteria (e.g., date range) in the printed output.
Preferred Solution (Optional)
This mechanism has already been implemented using the client-side jsPDF library, and works as follows:
1. Leverage Interactive Report data – Extract displayed data (including aggregations and pivots) directly from the DOM after any user filtering or sorting.
2. Dynamic header/footer generation – Supports text and images (e.g., logos) with configurable settings.
3. Embed filters automatically – Read filter values (e.g., P1_FROM_DATE, P1_TO_DATE) and add them to the printed report.
4. Ready-to-use template system – Store templates as JSON objects defining fonts, colors, margins, and header/footer fields; users can select any template at print time.
5. Handle aggregated/pivot tables – Detect table structure including rowspan/colspan to ensure correct PDF output.
6. Convert to PDF – Use jsPDF to generate a multi-page PDF while preserving formatting.
Final result: One print button on the report page. When clicked, a quick preview opens, the user selects a template, and a ready-to-save/print PDF is generated.
Attached is a link to a video explaining the concept.
https://youtu.be/e24jRMQZFhY?si=GP0kgjjboIdHB0QZ