Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Document generation tutorial



This article is a tutorial which explains how to generate a PDF or DOCX document.

We will assume that the first tutorial has already been done. We have two articles in our wiki:
  • first article: belong to two categories: "articles" and "othercategory"
  • second article: belong to one category: "articles"

Specify explictly the document content

We will specify the content by defining the articles names explicitly. Let's define two chapters, with the first article in the first chapter, and the second article in the second chapter:
  <documentContent>
     <chapter name="chapter1">
        <article name="first article" />      
     </chapter>
     <chapter name="chapter2">
        <article name="second article" />   
     </chapter>
  </documentContent>

Generating the document

Now for the generation, we will specify the following proeprties to generation a DOCX document rather than a wiki:
  • Output Type: docx
  • Document Content: our document content specification

tutorialdocProperties

Specify the document content by categories

We will specify the content by defining the categories we want in each chapter. We will have the same result as with the first document content specification.
  <documentContent>
     <chapter name="chapter1">
        <category name="othercategory" />      
     </chapter>
     <chapter name="chapter2">
        <category name="articles" />   
     </chapter>
  </documentContent>

See also


Categories: tutorials

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.