30. DashPattern
CREATE OR REPLACE procedure test30 is
-- DashPattern
---------------
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.DrawLine(20,20,100,20); -- normal line
plpdf.SetDashPattern(5,2); -- set dash to 5,2
plpdf.DrawLine(20,40,100,40); -- dashed line
plpdf.SetLineWidth(1); -- se width of line to 1mm
plpdf.DrawLine(20,60,100,60); -- dashed line
plpdf.SetDashPattern(); -- set dash to normal
plpdf.DrawLine(20,80,100,80); -- dashed line
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: test30.prc
Result: test30.pdf