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 :

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

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
            setCover(writer, document, event);

            StringBuilder htmlString = new StringBuilder();
            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) {
            int status = ct.go();
            while(ColumnText.hasMoreText(status)) {
                ct.setSimpleColumn(5, 65, 930, 500);
                status = ct.go();
            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 ..


Source: AngularJS