31. DrawPolygon
CREATE OR REPLACE procedure test31 is -- DrawPolygon ---------------
l_blob blob; l_filename varchar2(30) := '123.pdf'; l_points plpdf_type.t_points; begin for l_i in 1..10 loop l_points(l_i).x := dbms_random.value(10,100); l_points(l_i).y := dbms_random.value(10,100); end loop; 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.DrawPolygon(l_points); 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: test31.prc
Result: test31.pdf
|