Solved

Generating pdf using oracle reports

Posted on 2008-10-30
4
1,175 Views
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.
0
Comment
Question by:shami4u
[X]
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
4 Comments
 
LVL 21

Accepted Solution

by:
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" 
as 
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.open();
	        document.add(new Paragraph(args[0]));
	      } 
	  catch (DocumentException de) 
             {
	        System.err.println(de.getMessage());
	     } 
	  catch (IOException ioe) 
             {
	        System.err.println(ioe.getMessage());
	     }
	  document.close();
       }
   };
 
create or replace function CREATE_NEW_PDF(p_src in varchar2) return varchar2 
as 
language java 
name 'Util.Create_Pdf(java.lang.String) return String'; 
 
 
 
 
And also I have executed: 
 
 
 
BEGIN 
dbms_java.grant_permission('<DB_USER>','java.io.FilePermission','$ORACLE_BASE','write'); 
dbms_java.grant_permission('<DB_USER>','java.lang.RuntimePermission','*', 'writeFileDescriptor' ); 
END; 
 

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

726 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