4. Font settings
CREATE OR REPLACE procedure test4 is -- Font settings l_blob blob; l_filename varchar2(30) := '123.pdf'; begin 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('Courier','BU',14); -- set font attributes: family: Courier, style: bold, underline font size: 14 plpdf.PrintCell(50,10,'Hello World!'); -- print text: cell size:50*10 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: test4.prc
Result: test4.pdf
|