Home Multiple pdf page in grails rendering plugin
Reply: 0

Multiple pdf page in grails rendering plugin

Baol
1#
Baol Published in 2017-12-06 15:26:16Z

I'm trying to create a pdf with a multiple pages with the same header and footer in GRAILS. I choose the Rendering Plugin (http://plugins.grails.org/plugin/grails/rendering). I created the template, but I need to replicate the header and footer in every page. There is an example of gsp:

 @page {
    size: 210mm 297mm;
 }
    thead { display: table-header-group; }
    tfoot { display: table-footer-group; }

</style>
</head>
<body>

<table>
    <thead>
    <tr>
        <td colspan="2" class="noborderAll">
        <table class="noborderAll">
            <tr><td class="noborderAll">
                <rendering:inlinePng bytes="${imageBytes}" class="imageSize"/>
            </td>
                <td>HEADER INFO </td>
            </tr>
        </table>
    </td>
    </tr>
    </thead>
    <tbody>

   <g:each in="${datalist}" var="data">
        <tr>
             <td>${data.name}</td>
             <td>${data.surname}</td>
             <td>${data.notes}</td>
        </tr>
    </g:each>
    </tbody>
    <tfoot>
        <tr>
            <td>info</td>
            <td >info</td>
        </tr>

    </tfoot>
</table>
</body>
</html>

If the data in ${datalist} is long and it goes to the second page, I'd like that the <theader> will be printed on the top of the new page. Is it possible?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302543 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO