CREATE OR REPLACE procedure test21 is -- Print row l_blob blob; l_datas plpdf_type.t_row_datas; -- array of datas l_borders plpdf_type.t_row_borders; -- array of borders l_widths plpdf_type.t_row_widths; -- array of widths l_aligns plpdf_type.t_row_aligns; -- array of aligns l_styles plpdf_type.t_row_styles; -- array of styles l_maxlines plpdf_type.t_row_maxlines; -- array of max lines begin plpdf.init; -- initialize: page orientation: portrait (default), unit (default): mm, default page format (default): A4 plpdf.NewPage; -- begin a new page, without parameters means: page orientation: default (portrait) -- set borders l_borders(1) := '1'; l_borders(2) := '1'; l_borders(3) := '1'; -- set widths l_widths(1) := 30; l_widths(2) := 40; l_widths(3) := 100; -- set aligns l_aligns(1) := 'R'; l_aligns(2) := 'C'; l_aligns(3) := 'L'; plpdf.SetPrintFont('Arial','B',12); -- set print font plpdf.SetColor4Filling(200,220,255); -- set background color -- print headers plpdf.PrintCell(l_widths(1),10,'ROWNUM','1',0,'C',1); plpdf.PrintCell(l_widths(2),10,'OWNER','1',0,'C',1); plpdf.PrintCell(l_widths(3),10,'OBJECT NAME','1',1,'C',1); plpdf.SetPrintFont('Arial',null,12); -- set print font for f_obj in (select rownum, owner, object_name from all_objects where rownum <= 10) loop -- set datas l_datas(1) := to_char(f_obj.rownum); l_datas(2) := f_obj.owner; l_datas(3) := f_obj.object_name; plpdf.Row_Print2(l_datas,l_borders,l_widths, l_aligns, l_styles,l_maxlines); -- print row end loop; plpdf.SendDoc(l_blob); -- create content -- print -- plpdf_util.print_blob(l_blob); -- or store insert into STORE_BLOB (blob_file, created_date) values (l_blob, sysdate); commit; end; /