PL/PDF

0 0
Read Time:1 Minute, 10 Second

In this blog, Steven Feuerstein writes about PL/PDF, a pl/sql library to generate PDF files. Sounds very interesting. It seems very easy to use, as is shown by an example on the site:

CREATE OR REPLACE package body test  is
  procedure pdf is
    l_blob blob;
  begin
    plpdf.init; — initialize
    plpdf.NewPage; — new page
    plpdf.SetPrintFont(‘Arial’,null,10); — set font
    plpdf.PrintCell(10,40,’Hello World!’); — Print a text
    plpdf.SendDoc(l_blob); — save the generated document
    — print
    owa_util.mime_header(‘application/pdf’,false);
    htp.p(‘Content-Length: ‘ || dbms_lob.getlength(l_blob));
    owa_util.http_header_close; 
    wpg_docload.download_file(l_blob);
  end;
end;
/

You can run this code directly from the web, using mod_plsql: http://server:port/pls/DAD/test.pdf, but storage or other options are off course also possible.

It is available for Oracle 9iR2 and up (and (with some limitations) also for Oracle XE) and the pdf can even include visual objects like pictures and (bar, lina and pie) diagrams and even barcodes.

Unfortunately, it is not open source, but it’s not very expensive. A trial is available that limits to 5 watermarked pages.

About Post Author

Aino Andriessen

Aino Andriessen is principal consultant and expertise lead 'Continuous Delivery'. His focus is on Oracle Fusion Middleware ADF and SOA development, Continuous Delivery, architecture, improving the software development proces and quality management. He is a frequent presenter at Oracle Open World, ODTUG Kaleidoscope, UKOUG Technology Conference and OUGN Vårseminar. He writes articles and publishes at the AMIS technology blog (http://technology.amis.nl/blog/).
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

2 thoughts on “PL/PDF

  1. I have created a new package first and then i’ve written the pl/pdf code in the package body and also defined the spec. But after then during compilation it’s giving me error like ‘ plpdf.init must be declared ‘ and plpdf.newpage must be declared , plpdf.setprintfront must be declared .

    I’m not getting for what these errors are comming.

  2. A license comes at $350 per database. Not very stiff at all – and not worth any serious development effort of our own.

    I have not downloaded the package and checked the source, but one could be forgiven for thiunking that perhaps they loaded the iText open source product into the Database JVM and created a PL/SQL wrapper around that. If that is not what they did – it is something one could do.

    But then again, at $350, one should not do anything if PL/PDF’s functionality is sufficient.

    The examples are quite compelling. I like this stuff.

Comments are closed.

Next Post

Oracle Forms: Productivity with new choices

Last Monday we had a KC meeting, where we discussed the latest features of Oracle Forms (OF). Basically these features break up into two categories: Oracle Forms Pl/Sql features Oracle Forms Java features   Oracle Forms ‘Native’ PlSql features.   The following Pl/Sql features were discussed Sortable blocksWith a simple […]
%d bloggers like this: