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

24. Draw sector

CREATE OR REPLACE PROCEDURE Test24 IS
-- Draw sector
l_blob BLOB; l_filename varchar2(30) := '123.pdf';

l_xc NUMBER;
l_yc NUMBER;
l_r NUMBER;

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)
l_xc := 105; -- abscissa of the center
l_yc := 55; -- ordinate of the center
l_r := 40; -- radius
Plpdf.SetColor4Filling(120,120,255); -- set filler color (RGB)
Plpdf.DrawSector(l_xc,l_yc,l_r,20,120); -- draw sector: start angle: 20, end angle:120
Plpdf.SetColor4Filling(120,255,120); -- set filler color (RGB)
Plpdf.DrawSector(l_xc,l_yc,l_r,120,250); -- draw sector: start angle: 120, end angle:250
Plpdf.SetColor4Filling(255,120,120); -- set filler color (RGB)
Plpdf.DrawSector(l_xc,l_yc,l_r,250,20); -- draw sector: start angle: 250, end angle:20
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: test24.prc

Result: test24.pdf

 

spacer
pl/sql pdf
mod_plsql pdf