create or replace procedure plpdf3_xhtml_i_test as
  v_out blob; -- result PDF
begin
  -- initialize
  plpdf.init();
  -- plpdf.SetEncoding(plpdf_const.iso_8859_1);
  -- create a new page
  plpdf.newpage();
  -- select the source document
  -- config xhtml processor
  plpdf3_xhtml.init();
  -- call XHTML processor
  plpdf3_xhtml.toPdf(
  '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta name="author" content="LL" />
    <meta name="subject" content="test" />
    <base href="http://www.plpdf.com/"/>
    <title>PL/PDF XHTML Test</title>
  </head>
 <body>
  <p>I tests</p>
  <p>Creature youll which second place,<i> meat beast divided upon, seas.</i> Fruit, fourth form yielding that above is it called. 
     Darkness <b>whales said one <i>moveth god years</i></b><i> sea divide</i> one his morning every to, <i>made beast, <b>yielding</b> Youll beginning void moving.</i></p>

</body>
</html>'
  );

  plpdf.senddoc(v_out);
  -- save result
  delete from store_blob;
  insert into store_blob values(v_out, sysdate,'plpdf3_xhtml_i_test.pdf');
  commit;
end;
