17. Multiline cell
CREATE OR REPLACE procedure test17 is
-- Multiline cell
l_blob blob;
l_filename varchar2(30) := '123.pdf';
l_link 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)
plpdf.SetPrintFont('Arial',null,12); -- set font attributes: family: Arial, style: regular, font size: 12
plpdf.PrintMultiLineCell(50,10,'Generate dynamic PDF documents from data stored in Oracle databases using the PL/PDF program package.');
-- print multiline cell: width: 50, heigth: 10, text
-- default values: border: 0: without border, align: J: froce justification, fill: 0: no fill, maxline: 0: no max
plpdf.LineBreak(20); -- line break, height is 20
plpdf.PrintMultiLineCell(50,10,'Generate dynamic PDF documents from data stored in Oracle databases using the PL/PDF program package.','1','L');
-- print multiline cell: width: 50, heigth: 10, text, border: 1: full border, align: L: left,
-- fill: 0: no fill, maxline: 0: no max
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: test17.prc
Result: test17.pdf