23. Bookmark
CREATE OR REPLACE PROCEDURE test23 IS -- Bookmark 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('Arial',NULL,12); -- set font attributes: family: Arial, style: regular, font size: 12 plpdf.CrBookmark('Page 1',0,-1); plpdf.PrintCell(50,10,'Hello World! 1'); -- print text: cell size:50*10 plpdf.LineBreak(20); plpdf.CRBookmark('Paragraph 1',1,-1); plpdf.PrintCell(50,10,'Hello World! 11'); -- print text: cell size:50*10 plpdf.NewPage; -- begin a new page, without parameters means: page orientation: default (portrait) plpdf.CrBookmark('Page 2',0,-1); plpdf.PrintCell(50,10,'Hello World! 2'); -- 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: test23.prc
Result: test23.pdf
|