Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL or Java stored procedure to generate PDF reports

Re: PL/SQL or Java stored procedure to generate PDF reports

From: Frank Hubeny <fhubeny_at_ntsource.com>
Date: Wed, 11 Oct 2000 00:10:06 -0500
Message-ID: <39E3F62D.75D6AF6B@ntsource.com>

It is possible to generate pdf with the pls/sql web toolkit, but I am not sure that it is worth the effort given that the xml standard for vector graphics, svg, is now available.

See http://www.adobe.com/svg/viewer/install/main.html for information on svg.

I have, experimentally, succeeded in generating pdf files from pl/sql and the following ideas seem to be critical for this to work: (1) The mime-type needs to be set correctly. (2) There is no need to calculate the byte offsets that one sees at the bottom of the pdf file since the file will display in the Acrobat reader even if they are not present. Indeed, one doesn't have to completely implement the standard to get the pdf file to correctly display in this reader. That is, you probably don't have to spend too much time making sure the specification is met exactly. (3) Although most pdf files are compressed, they do not have to be compressed. They only require ascii text in uncompressed format. Hence pl/sql can generate them.
(4) If you have Acrobat Exchange and a text editor, you can generate an uncompressed view of the pdf file from Exchange and open it in the text editor to see what the required file structure actually looks like.

An alternative to generating pdf is to generate an fdf file which fills in a pdf form field. This takes far less development effort to get to work correctly. You would need only a couple of pages of pl/sql to build the procedures that would generate this file format.

However, the most interesting development is svg. This would place pdf as a desirable format for ebooks and documents permitting electronic signatures rather than as a format one would want to dynamically generate.

Frank Hubeny

James wrote:

> Oracle Developer and Reports Server can easily generate PDF reports on the
> fly. But I'd like to explore the possibility to generate PDF reports using
> PL/SQL or Java stored procedure. There are some java library on the internet
> but it seems to me that there are developed for java applet. Has anyone
> tried stored procedure to generate PDF file? Your help will be greatly
> appreciated.
>
> James
Received on Wed Oct 11 2000 - 00:10:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US