Generate PDF For Children Pages
Last modified by Vincent Massol on 2021/03/18 11:28
![]() | Exports a page as PDF and get all children pages in the PDF |
Type | Snippet |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
This will not put a page break between pages. This is a rudimentary way of printing several XWiki pages.
Code
#if($context.action=="pdf")
#set($sql = "where doc.parent='$doc.fullName'")
#foreach($item in $xwiki.searchDocuments($sql))
#includeTopic($item)
#end
#end
#set($sql = "where doc.parent='$doc.fullName'")
#foreach($item in $xwiki.searchDocuments($sql))
#includeTopic($item)
#end
#end