CREATE OR REPLACE PROCEDURE Grid_A4_1x1mm IS -- grid --------------- l_blob BLOB; BEGIN Plpdf.init; -- initialize, without parameters means: page orientation: portrait, unit: mm, default page format: A4 Plpdf.SetAutoNewPage(FALSE,0); Plpdf.NewPage; -- begin a new page, without parameters means: page orientation: default (portrait) Plpdf.SetPrintFont('Arial','B',6); Plpdf.SetColor4Filling(255,255,255); -- set color for filling (RGB) Plpdf.SetLineWidth(0.4); FOR l_i IN 1..20 LOOP Plpdf.DrawLine(l_i*10,0,l_i*10,297); END LOOP; FOR l_i IN 1..29 LOOP Plpdf.DrawLine(0,l_i*10,210,l_i*10); END LOOP; Plpdf.SetLineWidth(0.1); FOR l_i IN 1..209 LOOP Plpdf.DrawLine(l_i,0,l_i,297); END LOOP; FOR l_i IN 1..296 LOOP Plpdf.DrawLine(0,l_i,210,l_i); END LOOP; FOR l_i IN 1..20 LOOP Plpdf.SetCurrentXY(l_i*10-4,5); Plpdf.PrintCell(8,3,TO_CHAR(l_i*10) || 'mm','0',0,'C',1); END LOOP; FOR l_i IN 1..29 LOOP Plpdf.SetCurrentXY(1,l_i*10-2); Plpdf.PrintCell(8,3,TO_CHAR(l_i*10) || 'mm','0',0,'C',1); END LOOP; Plpdf.SendDoc(l_blob); -- create content -- print /* owa_util.mime_header('application/pdf'); 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; /