Allors.Documents
2.0.0
Prefix Reserved
See the version list below for details.
dotnet add package Allors.Documents --version 2.0.0
NuGet\Install-Package Allors.Documents -Version 2.0.0
<PackageReference Include="Allors.Documents" Version="2.0.0" />
<PackageVersion Include="Allors.Documents" Version="2.0.0" />
<PackageReference Include="Allors.Documents" />
paket add Allors.Documents --version 2.0.0
#r "nuget: Allors.Documents, 2.0.0"
#:package Allors.Documents@2.0.0
#addin nuget:?package=Allors.Documents&version=2.0.0
#tool nuget:?package=Allors.Documents&version=2.0.0
Allors Documents
Embed template tags inside open office documents.
Status
Usage
Write the template in LibreOffice Writer. Tags go into placeholder fields (Insert, Field, More Fields, Functions, Placeholder):
| Tag | Meaning |
|---|---|
<$path> |
The value at path in the model, for example <$Invoice.Number>. |
<@for item path> ... <@end> |
Repeats the paragraphs or table rows between the tags for every element of the collection at path. |
<@if path> ... <@end> |
Keeps the paragraphs or table rows between the tags when the value at path is not null, not false and not an empty collection. |
A picture frame named $path shows the image whose name is the value at path; pass the images to Render by name.
var template = new OpenDocumentTemplate<InvoiceModel>(templateBytes);
byte[] document = template.Render(model, new Dictionary<string, byte[]> { ["logo"] = logoPng });
With a dictionary as the model, name the arguments: new OpenDocumentTemplate(templateBytes, "Invoice,Logo").Render(dictionary, images).
Rendering rules
- The template renders as typed. Static text and attribute values pass unchanged, including
&,<,>,", backslashes and the characters˂and˃(U+02C2 and U+02C3) that the engine uses as its delimiters. The engine adds no white space of its own: a word split by formatting stays one word, and two adjacent tags render without a space between them. - Bound values are escaped for XML and keep their white space: a tab becomes
<text:tab/>, a line break<text:line-break/>and a run of spaces<text:s/>, as Writer saves them. Other characters below U+0020 are dropped. Booleans render astrueorfalse; other values render throughToString()in the current culture. - The paragraph or table row that holds a
<@for>,<@if>or<@end>tag is removed with the rest of its text, so give each tag its own paragraph or row. - The package starts with an uncompressed
mimetypeentry. PNG, JPEG, GIF and WebP pictures are stored; everything else is deflated.
Build
Prerequisites: .NET SDK 10.0 and Task.
taskortask ci— build, test and packtask test— build and run teststask pack— create the NuGet packages inartifacts/nugettask clean— clean build outputs
Versioning is handled by Nerdbank.GitVersioning (version.json).
Release
Pushing a tag vX.Y.Z or vX.Y.Z-rc.N runs release.yml: it builds, tests and packs, publishes the package to nuget.org through trusted publishing from the nuget-release environment, and creates a GitHub release. The package version comes from version.json, so set it to the tag's version before tagging.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- StringTemplate4 (>= 4.0.8)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Allors.Documents:
| Package | Downloads |
|---|---|
|
Allors.Documents.Reflection
Bind Allors Documents templates to plain classes and dictionaries through reflection. |
|
|
Allors.Documents.Imaging
Scale the pictures of Allors Documents templates to their frames. |
|
|
Allors.Documents.Barcodes
Draw barcodes into the picture frames of Allors Documents templates. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 1,512 | 10/19/2026 |
| 3.2.0 | 190 | 10/16/2026 |
| 3.1.0 | 246 | 10/15/2026 |
| 3.0.0 | 209 | 10/15/2026 |
| 2.1.0 | 237 | 10/14/2026 |
| 2.0.0 | 188 | 10/14/2026 |
| 1.2.0 | 193 | 10/13/2026 |
| 1.2.0-rc.1 | 66 | 10/13/2026 |
| 1.0.10 | 20,802 | 3/11/2024 |
| 1.0.5 | 274 | 3/11/2024 |
| 1.0.4 | 13,752 | 4/19/2022 |
| 1.0.3 | 19,006 | 6/18/2020 |
| 1.0.0 | 2,592 | 4/15/2020 |