Skip to content

Commit

Permalink
Templater v4.5.0
Browse files Browse the repository at this point in the history
Update Pictures example to show how to replace existing placeholder image.
Add barcode example to Labels. Embed custom font into document.
  • Loading branch information
zapov committed Jul 2, 2020
1 parent 04ae968 commit b17c783
Show file tree
Hide file tree
Showing 161 changed files with 196 additions and 154 deletions.
2 changes: 1 addition & 1 deletion Advanced/CsvStreaming/CsvStreaming.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Private>True</Private>
</Reference>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/CsvStreaming/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.13.0" targetFramework="net40-Client" />
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/CsvStreaming/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>csv-streaming-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>CSV streaming</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CsvStreamingExample {
static class Quoter implements IDocumentFactoryBuilder.ILowLevelReplacer {

@Override
public Object replace(Object value) {
public Object replace(Object value, String tag, String[] metadata) {
if (value != null) {
String str = value.toString();
int ind1 = str.indexOf(',');
Expand All @@ -35,7 +35,7 @@ public Object replace(Object value) {
static class NumberAsComma implements IDocumentFactoryBuilder.ILowLevelReplacer {

@Override
public Object replace(Object value) {
public Object replace(Object value, String tag, String[] metadata) {
if (value instanceof BigDecimal) {
BigDecimal bd = (BigDecimal)value;
return bd.toString().replace('.', ',');
Expand Down
2 changes: 1 addition & 1 deletion Advanced/DepartmentReport/DepartmentReport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/DepartmentReport/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/DepartmentReport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>department-report-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>DepartmentReportExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Advanced/DoubleProcessing/DoubleProcessing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/DoubleProcessing/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/DoubleProcessing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>double-processing-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>DoubleProcessingExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Advanced/PowerQuery/PowerQuery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/PowerQuery/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/PowerQuery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>power-query-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>PowerQueryExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Advanced/SalesOrderMVP (.NET)/SalesOrderMVP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<Private>True</Private>
</Reference>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/SalesOrderMVP (.NET)/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Fluent.Ribbon" version="3.6.1.236" targetFramework="net40-Client" />
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/SheetReport/SheetReport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Private>True</Private>
</Reference>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/SheetReport/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpZipLib" version="0.86.0" targetFramework="net40-Client" />
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/SheetReport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>sheet-report-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>SheetReportExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
23 changes: 23 additions & 0 deletions Advanced/TemplaterServer/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>templater-server</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion Advanced/TemplaterServer/TemplaterServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Templater" Version="4.4.0" />
<PackageReference Include="Templater" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Advanced/TemplaterServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>templater-server</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>TemplaterServer</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
Binary file modified Advanced/TemplaterServer/resources/templates/Label.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion Advanced/XmlBinding/XmlBinding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Advanced/XmlBinding/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Advanced/XmlBinding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>xml-binding-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>XmlBindingExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Beginner/BeerList (Scala)/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ version := "1.0.0-SNAPSHOT"
organization := "hr.ngs.templater.example"
scalaVersion := "2.11.12"

libraryDependencies += "hr.ngs.templater" %% "templater" % "4.4.0"
libraryDependencies += "hr.ngs.templater" %% "templater" % "4.5.0"
2 changes: 1 addition & 1 deletion Beginner/CsvExample/CsvExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion Beginner/CsvExample/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/CsvExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>csv-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>CSV</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Beginner/DataSet (.NET)/DataSetExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Beginner/DataSet (.NET)/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/DynamicResize/DynamicResize.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Beginner/DynamicResize/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/DynamicResize/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>dynamic-resize</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>DynamicResize</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Beginner/ExcelLinks/ExcelLinks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Beginner/ExcelLinks/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/ExcelLinks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>excel-links-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>Excel links</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Beginner/ImageExample/ImageExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Beginner/ImageExample/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/ImageExample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>image-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>ImageExample</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
2 changes: 1 addition & 1 deletion Beginner/Labels/Labels.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
7 changes: 6 additions & 1 deletion Beginner/Labels/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ but often using built-in Word/Excel features offer for more convenient solution.

### Tag analysis

Built-in type processor for dictionary collection will analyze all elements of the collection to find best context matching tags within the document and keys in dictionaries.
Built-in type processor for dictionary collection will analyze all elements of the collection to find best context matching tags within the document and keys in dictionaries.

### Barcodes

Fonts can be used in creative ways and one such way is to printing barcodes via custom fonts.
If font is embedded in the document, document will open even on systems which do not have such fonts installed.
2 changes: 1 addition & 1 deletion Beginner/Labels/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Templater" version="4.4.0" targetFramework="net40-Client" />
<package id="Templater" version="4.5.0" targetFramework="net40-Client" />
</packages>
2 changes: 1 addition & 1 deletion Beginner/Labels/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>hr.ngs.templater.example</groupId>
<artifactId>labels-example</artifactId>
<packaging>jar</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<name>Labels</name>
<url>https://github.com/ngs-doo/TemplaterExamples</url>

Expand Down
Binary file modified Beginner/Labels/result.docx
Binary file not shown.
Binary file modified Beginner/Labels/template/label.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion Beginner/ListExample/ListExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NGS.Templater">
<HintPath>..\..\packages\Templater.4.4.0\lib\Net40\NGS.Templater.dll</HintPath>
<HintPath>..\..\packages\Templater.4.5.0\lib\Net40\NGS.Templater.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
Loading

0 comments on commit b17c783

Please sign in to comment.