creating pdf documents using pl/sql create pdf in pl/sql generate pdf in pl/sql
pdf by pl/sql pl/sql Oracle Sql PDF pl/sql pdf generate
tool develop oracle pl/sql download
creating html_db applications
spacer
plsql generate pdf
html_db spacer Home Examples
printemail html_db printed report

29. ImageCell

CREATE OR REPLACE procedure test29 is
-- ImageCell
 
  l_blob blob;
  l_filename varchar2(30) := '123.pdf';
  l_image blob;
 begin
 
   select image_file
     into l_image
   from image_blob
   where id = 4
   for update;
 
    plpdf.init; -- initialize, without parameters means: page orientation: portrait, unit: mm, default page format: A4
    plpdf.NewPage; -- begin a new page, without parameters means: page orientation: default (portrait)
    plpdf.SetPrintFont('Arial',null,12); -- set font attributes: family: Arial, style: regular, font size: 12
    Plpdf.SetColor4Filling(plpdf_const.Dark_turquoise);
    Plpdf.PrintImageCell(50,50,'Image4 ',
      l_image,
      5, -- p_margin number default 0,
      '1', -- p_border VARCHAR2 DEFAULT '0',
      0, -- p_ln NUMBER DEFAULT 0,
      1, -- p_fill NUMBER DEFAULT 0,
      'http://www.oracle.com' -- p_link VARCHAR2 DEFAULT NULL);
      );
    
    plpdf.SendDoc(l_blob); -- create content
 
 -- print
 /*
 owa_util.mime_header('application/pdf',false);
        htp.p('Content-Disposition: inline; filename="' || l_filename || '"'); 
        htp.p('Content-Length: ' || dbms_lob.getlength(l_blob));
        owa_util.http_header_close;  
        wpg_docload.download_file(l_blob);
        */
   
 -- or store
 insert into STORE_BLOB (blob_file, created_date) values (l_blob, sysdate);
 commit;
 end;
/

Source: test29.prc

Result: test29.pdf

spacer
pl/sql pdf
mod_plsql pdf