PL/PDF 20188367001

PL/PDF

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.

2 Comments

  1. Prodyut Sen September 15, 2006
  2. Lucas Jellema April 7, 2006