Angular / iTextPDF : export html with page break in pdf

I’m using AngularJS with Jhipster.

I need to make an export PDF of a part of my page html.

My html part look like this :

<ul>
   <div ng-repeat="prop in vm.properties">
      <li>
         <span translate="test.ccxx"></span>
         <div>
            <table ng-repeat="tab in vm.tables">
               <tr>
                  <th>
                     <span>{{tab.name}}</span>
                  </th>
               </tr>
               <tr ng-repeat="flow in vm.flows">
                  <td>
                     <span>{{flow.title}}</span>
                     <ul>
                         <li ng-repeat="us in vm.res[flow.id].us">
                            <span>
                                <img src="../content/flag_{{us.flag}}" />
                            </span>
                         </li>
                      </ul>
                   </td>
                </tr>
             </table>
          </div>
       </li>
   </div>
</ul>

It is well displayed in my view.
But now i need to export only this part in the body of my itext page.

String jrxmlPath = "C:UsersXXXXXDownloadstestPDF.pdf";

            Date date = new Date();
            SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY/MM/DD");
            String dateStr = dateFormat.format(date);

            Document document = new Document(PageSize.A4.rotate(), 0, 0, 0, 0);
            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(jrxmlPath));

            // SET COVER -- add a header and a foooter to all pages
            document.open();
            setCover(writer, document, event);

            StringBuilder htmlString = new StringBuilder();
htmlString.append(myhtml);
            InputStream is = new ByteArrayInputStream(htmlString.toString().getBytes());
            XMLWorkerHelper worker = XMLWorkerHelper.getInstance();
            ElementHandlerClass ehc = new ElementHandlerClass();
            worker.parseXHtml(ehc, new StringReader(htmlString.toString()));

            ColumnText ct = new ColumnText(writer.getDirectContent());
            ct.setSimpleColumn(5, 65, 830, 500);
            for(Element element : ehc.elements) {
                ct.addElement(element);
            }
            int status = ct.go();
            while(ColumnText.hasMoreText(status)) {
                document.newPage();
                ct.setSimpleColumn(5, 65, 930, 500);
                status = ct.go();
            }
            document.close();
            System.out.println("PDF Created"); 

This java part create a pdf file with a header and a footer for all pages.
It added my html in the column text.

My problem concern the tables that is positionned in the page break. I need to display the full table in one piece and not cut like today.

I’m trying with page-break… but nothing successful for now.

Is anyone had an idea ?

Another problem is for the image that is not in my pdf ..

Thanks

Source: AngularJS