create or replace package a_table_test_docx is
   -- Required procedure
  procedure genDOCX;
 
  -- Required variable
  v_docx blob;
   
  
end a_table_test_docx;
/
create or replace package body a_table_test_docx is
/* 2016-JAN-26 09:50 */
/* PL/PDF REPORTER 3.7.0 */
l_paragraph1 pls_integer;
l_text_idx1 pls_integer;
l_paragraph2 pls_integer;
l_text_idx2 pls_integer;
l_paragraph3 pls_integer;
l_text_idx3 pls_integer;
l_paragraph4 pls_integer;
l_text_idx4 pls_integer;
procedure genDOCX is
 begin 
ploffx_docx.init( );
/* START PARAGRAPH */
l_paragraph1 := ploffx_docx.crParagraph();
l_text_idx1 := ploffx_docx.addText( p_paragraph_id => l_paragraph1, p_text => 'Default header', p_fontName => 'Arial', p_fontSize => 14);
ploffx_docx.AddToHeader( p_element_id => l_paragraph1, p_header => 'default');
/* START PARAGRAPH */
l_paragraph2 := ploffx_docx.crParagraph();
l_text_idx2 := ploffx_docx.addText( p_paragraph_id => l_paragraph2, p_text => 'Add default header');
ploffx_docx.addParagraph(p_paragraph_id => l_paragraph2);
/* START PARAGRAPH */
l_paragraph3 := ploffx_docx.crParagraph(p_pageBreakBefore => true);
l_text_idx3 := ploffx_docx.addText( p_paragraph_id => l_paragraph3, p_text => '2nd page');
ploffx_docx.addParagraph(p_paragraph_id => l_paragraph3);
/* START PARAGRAPH */
l_paragraph4 := ploffx_docx.crParagraph(p_pageBreakBefore => true);
l_text_idx4 := ploffx_docx.addText( p_paragraph_id => l_paragraph4, p_text => '3rd page');
ploffx_docx.addParagraph(p_paragraph_id => l_paragraph4);
ploffx_docx.getDoc( p_blob_file => v_Docx);
end;
end a_table_test_docx;
/
