Templater 2.5.1
Supported formats: docx - Microsoft Office Open XML document format xlsx - Microsoft Office Open XML spreadsheet format csv, txt - Text format (can be used for comma separated values - spreadsheet document)
Default datatypes (.NET/JVM): DataSet/NA - special keyword: clone DataTable/NA - special keyword: fixed DataRow/NA IEnumerable/Iterable - special keywords: clone, fixed IDictionary/Map object/Object - special keyword: all IDataReader/ResultSet - special keyword: fixed
Keywords: clone - used for cloning entire document. Templater will append current document with current content. fixed - used in resizeable objects (like table) when you don't want to resize that object. For example, you have table with fixed number of rows and want Templater to replace those IEnumerable values and replace all others with empty string page - used for specifying resizing of the page range in docx. When tag is placed in table and you want to resize entire page, not number of rows in that table, use page to override default context resize sheet - used for specifying resizing of the sheet in xlsx. If you want to resize sheet range you can place tag in header or use sheet metadata on tag which is used for resizing. all - replaces all instances of selected tag with provided values. Useful when there is same tag on various places in document and Templater is unable to conclude that they should all be replaced with single value repeat - when same collection needs to be applied multiple times on a single document header - for DataTable/ResultSet data types, include header during dynamic resize page-break - when doing resize include page break between elements horizontal-resize - in Excel resize context horizontally instead of vertically whole-column - use whole column instead of minimum spanning range during horizontal resize merge-nulls - special handling of null values in tables/cells. Cells will be merged if null value is detected remove-old-xml - when XElement/Element is provided, remove the XML tree where tag was detected. Useful for cleaning up whitespace garbage replace-xml - when XElement/Element is provided, remove the children of matching XML tree and replace it with the provided XML. Useful for setting color in Word tables merge-xml - when XElement/Element is provided, merge provided XML with the surounding XML of the detected tag. Useful for setting color without removing old XML
Default plugin keywords: format - if encountered on date value it will replace DateTime value with string value (short date string if time part is empty) format(X) - replaces current value formatted by X argument (for example N2 for number with two decimals) substring(n) - returns substring of provided values after n chars substring(n,l) - returns substring of provided values after n chars with l length padLeft(n) - append space from left to create string of at least n length padLeft(n,c) - append char c from left to create string of at least n length padRight(n) - append space from right to create string of at least n length padRight(n,c) - append char c from right to create string of at least n length join(X) - flattens array to create a string with X between (for example {1,2,3}.join(-) becomes 1-2-3) hide - replaces current value with empty string empty(X) - if value is null or empty (IEnumerable.length = 0) it will replace value with X bool(yes,no) - boolean value will be converted to yes or no bool(YES,NO,MAYBE) - boolean value will be converted to YES, NO or MAYBE offset(D:H:M) - DateTime value will be offsetted by parsed Timestamp (special sign : is escaped with ) collapse - if value is null or empty (IEnumerable.length = 0) current context will be collapsed; tag will be removed
Special datatypes:
Image/Icon - convert to image (JVM version uses 72dpi)
XElement/Element - insert XML as is into document
IEnumerable
PDF conversion: Templater doesn't support PDF format, but other tools can be used to convert docx->PDF. Example of LibreOffice usage for PDF conversion:
C:\Program Files (x86)\LibreOffice 4\program\soffice.exe -norestore -nofirststartwizard -nologo -headless -convert-to pdf input-document.docx
will result in input-document.pdf file. Please note that LibreOffice doesn't support full range of Microsoft Office features and as such have issues with very complicated documents. Best thing to do in that case is to tweak the document template in Word, until LibreOffice can display it like Word.
Showing the top 20 packages that depend on Templater.
Packages | Downloads |
---|---|
Finsa.CaravanCore
Package Description
|
30 |
Finsa.CaravanCore
Package Description
|
33 |
Finsa.CaravanCore
Package Description
|
34 |
Finsa.CaravanCore
Package Description
|
50 |
Finsa.CaravanCore
Package Description
|
64 |
Finsa.CaravanCore
Package Description
|
65 |
Finsa.CaravanCore
Package Description
|
74 |
Finsa.CaravanCore
Package Description
|
87 |
Finsa.CaravanCore
Package Description
|
99 |
Finsa.CaravanCore
Package Description
|
105 |
Finsa.CaravanCore
Package Description
|
106 |
Finsa.CaravanCore
Package Description
|
152 |
Finsa.CaravanCore
Package Description
|
177 |
Finsa.CaravanCore
Package Description
|
288 |
Finsa.CaravanCore
Package Description
|
384 |
Finsa.CaravanCore
Package Description
|
431 |
Finsa.CaravanCore
Package Description
|
473 |
Finsa.CaravanCore
Package Description
|
574 |
Finsa.CaravanCore
Package Description
|
1,254 |
Finsa.CaravanCore
Package Description
|
2,164 |
Version | Downloads | Last updated |
---|---|---|
8.2.0 | 11 | 04/16/2025 |
8.1.0 | 22 | 09/29/2024 |
8.0.0 | 25 | 02/14/2024 |
7.3.0 | 23 | 02/14/2024 |
6.2.0 | 42 | 02/18/2022 |
6.0.0 | 24 | 08/03/2021 |
5.2.0 | 26 | 03/02/2021 |
5.1.1 | 23 | 12/21/2020 |
5.1.0 | 24 | 12/18/2020 |
5.0.1 | 128 | 10/28/2020 |
5.0.0 | 40 | 10/23/2020 |
4.6.0 | 1,069 | 09/14/2020 |
4.5.0 | 33 | 08/06/2020 |
4.4.0 | 42 | 07/09/2020 |
4.3.0 | 28 | 02/11/2020 |
3.2.1 | 21 | 02/14/2024 |
2.9.6 | 80 | 02/11/2020 |
2.8.0 | 25 | 02/10/2020 |
2.6.0 | 24 | 02/10/2020 |
2.5.1 | 20 | 02/10/2020 |
2.5.0 | 24 | 02/10/2020 |
2.4.2 | 21 | 02/10/2020 |