Generating pdf using oracle reports

Posted on 2008-10-30
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 21

Accepted Solution

oleggold earned 2000 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 java.io.FileOutputStream;
import java.io.IOException;
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup
Suggested Courses

765 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