Generating pdf using oracle reports

Posted on 2008-10-30
Last Modified: 2013-12-11
We need to generate a pdf file using the images stored in the tables. Images are stored in the BFILE format and our website is in PL/SQL. So we know we can generate pdf files using oracle reports. what are steps to be followed . We need to do this in the code of PL/SQL(programatically). Has anyone done this before ? Please help with an answer.
Question by:shami4u
  • 2
LVL 21

Expert Comment

ID: 22887166
LVL 21

Accepted Solution

oleggold earned 500 total points
ID: 22887195
Quating from the above
to  have jave code to work with frr pdf writing options like Ghostscript You need the following
create or replace and compile 

java source named "Util" 


package createpdf;




import com.lowagie.text.*;

import com.lowagie.text.pdf.PdfWriter;


public class Util extends Object 


    public static void Create_Pdf(String args[]) 


	  Document document = new Document();

	  try {

	        PdfWriter.getInstance(document, new FileOutputStream("d:\\Doc.pdf"));

	        document.add(new Paragraph(args[0]));


	  catch (DocumentException de) 




	  catch (IOException ioe) 








create or replace function CREATE_NEW_PDF(p_src in varchar2) return varchar2 


language java 

name 'Util.Create_Pdf(java.lang.String) return String'; 


And also I have executed: 



dbms_java.grant_permission('<DB_USER>','java.lang.RuntimePermission','*', 'writeFileDescriptor' ); 



Open in new window


Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to take different types of Oracle backups using RMAN.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now