GroupDocs.Assembly for Java 26.11 Release Notes
26.11 brings the features and fixes of GroupDocs.Assembly for .NET 26.11 to Java. Templates can be checked against a JSON Schema, the loading of external resources is under the control of the application, pages of documents can be rendered to images, and empty paragraphs are removed in spreadsheet and plain text templates as well. <<image>> tags resolve relative paths against the template folder and work in table cells of presentations, and color tags accept hex strings. The bundled Aspose engines move from their early 2026 versions to 26.10. The release also fixes licensing from a stream that has already been read, the encoding of text and HTML reports, barcodes whose font is not installed, and the extra empty paragraph after HTML content reported as ASSEMBLYJAVA-354. Java 8 remains the baseline.
<<image [item.PhotoUrl]>> where PhotoUrl is an http or https URI now gives an empty image. Resources referenced by the template itself and local file paths work as before. See Control of external resources.Full list of changes in this release
| ID | Summary | Category |
|---|---|---|
| ASSEMBLYNET-145 | JsonDataSource accepts a JSON Schema. Members declared in the schema can be referenced even when they are null, empty or missing in the data, and value types come from the schema | Feature |
| ASSEMBLYNET-8 | DocumentAssembler.generatePreview renders pages of templates, assembled reports and other documents to PNG, JPEG or BMP images, with PreviewOptions.setResolution | Feature |
| ASSEMBLYNET-36, ASSEMBLYNET-37 | DocumentAssemblyOptions.REMOVE_EMPTY_PARAGRAPHS works for spreadsheet templates and plain text documents: a line left empty by template tags is removed with its line break | Feature |
| ASSEMBLYNET-140 | External resources referenced by templates and data are under the control of the application: LoadSaveOptions gets setSkipExternalResources, setTrustTemplateResources, getWhitelistedResources and setExternalResourceHandler. Resources whose references come from data are skipped by default | Security |
| ASSEMBLYJAVA-353 | Aspose.Words 26.10.1, Aspose.Cells 26.10, Aspose.Slides 26.10, Aspose.Email 26.9 and Aspose.BarCode 26.10 are bundled, in place of the early 2026 versions reported by security scanners | Update |
| ASSEMBLYJAVA-353 | GS1 barcodes (EAN-14, SCC-14, SSCC-18 and DataBar) keep the auto-correction of their code text with Aspose.BarCode 26.10, which stopped doing it on its own | Fix |
| ASSEMBLYNET-52 | An <<image>> tag works in a table cell of a presentation, the image becoming the picture fill of the cell, and tags in shapes of group shapes are processed | Enhancement |
| ASSEMBLYNET-62 | A relative image path from data is resolved against the folder of the template, or against LoadSaveOptions.getResourceLoadBaseUri for a template loaded from a stream | Enhancement |
| ASSEMBLYNET-25 | A color given as a string can be a hex value: "#RRGGBB", "#RGB" or "#AARRGGBB", in backColor and chart color tags | Enhancement |
| ASSEMBLYNET-155 | A missing Boolean of JSON, XML or CSV data counts as false in the conditional operator ?: and in the predicates of where, count, any, all and first, instead of failing with a NullPointerException | Fix |
| ASSEMBLYNET-157 | groupBy and distinct over a nested object of JSON, XML and DataSet data merge equal objects instead of giving one group per row, and $id/$ref references of JSON data are supported | Fix |
| ASSEMBLYNET-142 | License.setLicense(InputStream) reads a ByteArrayInputStream or a FileInputStream from its beginning, so a stream that has already been read no longer fails with “Unexpected EOF in prolog” | Fix |
| ASSEMBLYNET-143 | Consumption of a metered license is reported when assembling a document or generating a preview completes, instead of later from a background thread | Fix |
| ASSEMBLYNET-158 | Text and HTML reports of ASCII-only templates are written in UTF-8, so non-Latin data is no longer lost to windows-1252 | Fix |
| ASSEMBLYNET-160 | A QR code and other barcodes whose code text is drawn by the engine no longer fail with NullPointerException: trueTypeFont when the font of their text box is not installed | Fix |
| ASSEMBLYNET-159 | Tags in the conversation topic of an MSG template are assembled like those of its subject | Fix |
| ASSEMBLYNET-152 | A <<doc>> tag in a spreadsheet, presentation or text template fails with a message saying that the tag is not supported for the format, and a failed assembleDocument leaves no empty output file | Fix |
| ASSEMBLYJAVA-354 | An -html expression tag ending its paragraph no longer leaves an empty paragraph after HTML ending with a block element; port of the .NET fix of ASSEMBLYNET-182 | Fix |
Features
JSON Schema support for JsonDataSource
ASSEMBLYNET-145. A template is checked against the structure of its data before any <<if>> is evaluated. With JSON, that structure was taken from the data itself, so a reference inside a branch that never renders failed when the data behind it was null, an empty array or missing:
<<if [customer.Cards.count() > 0]>>Payment card: <<[customer.Cards.first().Type]>><</if>>
With "Cards": [] or "Cards": null, the assembly failed with “Can not get the value of member ‘Type’”, although the condition is false.
JsonDataSource now accepts a JSON Schema, the same way XmlDataSource accepts an XML Schema. The template is checked against the schema rather than the data:
- members declared in the schema can be referenced even if they are
null, empty or absent in the data; - members not declared in the schema still fail, so misspelled names are detected as before;
- value types come from the schema, so a
booleanis a Boolean and astringholding digits stays a string.
The customer below has no payment cards and no loyalty data, and its account number is a string of digits:
{ "Name": "Quayside Bistro", "Account": "00042", "Cards": [], "Loyalty": null }
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"Name": { "type": "string" },
"Account": { "type": "string" },
"Cards": {
"type": "array",
"items": { "type": "object", "properties": { "Type": { "type": "string" }, "Last4": { "type": "string" } } }
},
"Loyalty": { "type": ["object", "null"], "properties": { "Level": { "type": "string" } } }
}
}
Template:
Customer: <<[customer.Name]>>
Account number: <<[customer.Account]>>
<<if [customer.Cards.count() > 0]>>Payment card: <<[customer.Cards.first().Type]>> ending in <<[customer.Cards.first().Last4]>><<else>>No payment card on file.<</if>>
Loyalty program: <<[customer.Loyalty?.Level]>>
JsonDataSource dataSource = new JsonDataSource("Customer.json", "Customer.schema.json");
DocumentAssembler assembler = new DocumentAssembler();
assembler.assembleDocument("Json schema.docx", "output.docx", new DataSourceInfo(dataSource, "customer"));
Result:
Customer: Quayside Bistro
Account number: 00042
No payment card on file.
Loyalty program:
Without the schema, the same template fails on customer.Cards.first().Type, and the account number is read as the number 42.
The schema can be given as a file path or as an InputStream, with or without JsonDataLoadOptions. Supported JSON Schema keywords: type (including nullable types such as ["string", "null"]), properties, items, format (date-time and date give date values), enum, const, allOf, and local $ref pointers (#/$defs/..., #/definitions/...). oneOf, anyOf, not, remote or recursive $ref, tuple-form items and arrays of arrays are not supported and cause an exception. With a schema, JsonDataLoadOptions.setSimpleValueParseMode and setExactDateTimeParseFormats are not applied (date values must follow ISO 8601), and data members not declared in the schema are ignored.
Document preview
ASSEMBLYNET-8. DocumentAssembler.generatePreview renders pages of a document to images: a template, a document assembled by GroupDocs.Assembly, or any other document of a supported format, from a file or a stream. Pages of word processing, text and HTML documents, printed pages of spreadsheets, slides of presentations and email messages with their header are rendered. PreviewOptions follows the options of other GroupDocs products, including setResolution.
The example assembles a report into memory and renders its pages to PNG files:
DocumentAssembler assembler = new DocumentAssembler();
ByteArrayOutputStream report = new ByteArrayOutputStream();
try (InputStream template = new FileInputStream("Customer orders.docx"))
{
assembler.assembleDocument(template, report,
new DataSourceInfo(new JsonDataSource("Customers.json"), "customers"));
}
// A stream is created for every page and released when the page is written.
PreviewOptions options = new PreviewOptions(
pageNumber -> new FileOutputStream("page" + pageNumber + ".png"),
(pageNumber, pageStream) -> pageStream.close());
options.setPreviewFormat(PreviewFormats.PNG);
options.setResolution(120); // dots per inch; 96 by default
// options.setPageNumbers(new int[] { 1, 2 }); // all pages by default
assembler.generatePreview(new ByteArrayInputStream(report.toByteArray()), options);
When both setWidth and setHeight are set, pages are scaled to fit that size keeping their aspect ratio, and the resolution is ignored. Previews are generated without loading any external resources, and generated images are counted by metered licensing like assembled documents.
REMOVE_EMPTY_PARAGRAPHS for spreadsheet and plain text templates
ASSEMBLYNET-36, ASSEMBLYNET-37. DocumentAssemblyOptions.REMOVE_EMPTY_PARAGRAPHS now works for spreadsheet templates and plain text documents as well. There, a paragraph is a line of text: a line of a cell’s text, or of a text document, that becomes empty after template tags are removed or replaced with empty values is removed together with its line break. Tags such as <<if>> and <<foreach>> written on their own lines no longer leave empty lines behind.
DocumentAssembler assembler = new DocumentAssembler();
assembler.setOptions(DocumentAssemblyOptions.REMOVE_EMPTY_PARAGRAPHS);
assembler.assembleDocument("Empty paragraph.txt", "result.txt", new DataSourceInfo("dummy", "dummy"));
Template:
Prefix
<<[""]>>
Suffix
Prefix
<<if [false]>>
Text to be removed
<</if>>
Suffix
Result:
Prefix
Suffix
Prefix
Suffix
The same template text in a cell of a spreadsheet gives the same result within the cell. Of the text formats, plain text documents are cleaned; HTML and XML documents stay as they are.
Security
Control of external resources referenced by templates and data
ASSEMBLYNET-140. An <<image>> or <<doc>> tag can evaluate to a URI taken from the data, and GroupDocs.Assembly fetched it with no way to prevent it. A server assembling documents from data supplied by others could thus be made to request internal addresses. Template documents can reference network resources too: an image of an HTML template, a linked image or an INCLUDEPICTURE field of a Word document, an external link of a workbook.
GroupDocs.Assembly now tells where each reference to an external resource comes from (ExternalResourceOrigin):
TEMPLATE: the template document references the resource itself, including a literal URI of a tag such as<<image ["https://example.com/logo.png"]>>;DATA: the reference comes from data, such as a URI a tag expression evaluates to, or a resource of a document inserted by<<doc>>from data.
By default, resources referenced by the template are loaded as before, and resources whose references come from data are skipped. Four properties of LoadSaveOptions control this:
setSkipExternalResources, true by default: external resources are not loaded;setTrustTemplateResources, true by default: resources referenced by the template are loaded even when skipping is on; set it to false when templates come from untrusted sources;getWhitelistedResources: host names (a host and its subdomains) or absolute URI prefixes allowed even when skipping is on;setExternalResourceHandler: anExternalResourceHandlercalled for every external resource before it is requested, with its URI, origin and pre-set skip decision, to allow it, skip it, or provide its content.
In the example, the template inserts an image with <<image [expression]>>, and the image URI comes from data:
final String photoUri = "https://images.example.com/photos/no-photo.jpg";
DocumentAssembler assembler = new DocumentAssembler();
// Default options: the URI comes from data, so the image is skipped and left empty.
assembler.assembleDocument("Inserting image.docx", "Skipped.docx", new DataSourceInfo(photoUri, "expression"));
// Allow a trusted host and see every decision. The handler can also provide the content itself.
LoadSaveOptions options = new LoadSaveOptions();
options.getWhitelistedResources().add("images.example.com");
options.setExternalResourceHandler(new LocalImageHandler("no-photo.jpg"));
assembler.assembleDocument("Inserting image.docx", "Provided.docx", options, new DataSourceInfo(photoUri, "expression"));
public class LocalImageHandler extends ExternalResourceHandler
{
private final String mImagePath;
public LocalImageHandler(String imagePath) { mImagePath = imagePath; }
@Override
public void onLoading(ExternalResourceLoadingArgs args)
{
System.out.println(ExternalResourceOrigin.toString(args.getOrigin()) + " resource " + args.getUri() + ": "
+ (args.isSkipped() ? "skipped" : "allowed"));
// Provide the content instead of requesting it.
if (!args.isSkipped() && args.getUri().toLowerCase().startsWith("https://images.example.com/"))
{
try
{
args.setData(Files.readAllBytes(Paths.get(mImagePath)));
}
catch (IOException e)
{
throw new UncheckedIOException(e);
}
}
}
}
Output:
Data resource https://images.example.com/photos/no-photo.jpg: allowed
External resources are resources reaching the network: http, https and ftp URIs, UNC paths (\\host\share) and file URIs with a remote host. Local file paths are not affected, so templates and <<image>> tags using local files keep working. A skipped image of a document is replaced with a transparent image; a skipped <<image>> or <<doc>> value is treated as an empty value.
Enhancements
Images in table cells and group shapes of presentations
ASSEMBLYNET-52. In a presentation template, an <<image>> tag could only be placed in a text box. Placed in a table cell, it failed with “Tag ‘image’ must be located within an image container”, so a table listing items with their pictures could not be built. Tags of any kind in shapes of a group shape were not processed and remained in the output.
A table cell is now an image container: the image becomes the picture fill of the cell, including cells of rows repeated by <<foreach>>:
| Name | Photo |
|---|---|
<<foreach [p in products]>><<[p.Name]>> | <<image [p.Photo] -fitHeight>><</foreach>> |
public class Product
{
private final String mName, mPhoto;
public Product(String name, String photo) { mName = name; mPhoto = photo; }
public String getName() { return mName; }
public String getPhoto() { return mPhoto; }
}
Product[] products = { new Product("Logo", "Images/Logo.jpg"), new Product("No photo", "Images/no-photo.jpg") };
new DocumentAssembler().assembleDocument("Image in table cell.pptx", "output.pptx",
new DataSourceInfo(products, "products"));
With -fitHeight, the row grows to show the image with its aspect ratio. The other fit switches keep the aspect ratio of the image within the cell, because the width of a cell is the width of its whole column. Shapes of group shapes, including nested groups, are processed like other shapes.
Relative image paths are resolved against the template folder
ASSEMBLYNET-62. An <<image>> tag that gets a relative file path from data, such as "Images/photo.png", failed with “Cannot load an image using the provided string value” unless the path was relative to the current directory of the application. A relative path is now resolved against the folder of the template first, by analogy with linked resources of Microsoft Office documents. For a template loaded from a stream, set the folder with LoadSaveOptions.setResourceLoadBaseUri, as a folder path or a file URI. If no file exists there, the current directory is used as before.
Templates are in C:\Reports\Templates and images in C:\Reports\Images, and the template inserts <<image [expression]>>:
final String relativePath = "../Images/no-photo.jpg";
DocumentAssembler assembler = new DocumentAssembler();
// A template loaded from a file: the path is resolved against the folder of the template.
assembler.assembleDocument("C:\\Reports\\Templates\\Inserting image.docx", "output.docx",
new DataSourceInfo(relativePath, "expression"));
// A template loaded from a stream has no folder: set it with setResourceLoadBaseUri.
LoadSaveOptions options = new LoadSaveOptions();
options.setResourceLoadBaseUri("C:\\Reports\\Templates");
try (InputStream template = new FileInputStream("C:\\Reports\\Templates\\Inserting image.docx");
OutputStream report = new FileOutputStream("output-from-stream.docx"))
{
assembler.assembleDocument(template, report, options, new DataSourceInfo(relativePath, "expression"));
}
Hex color strings in backColor and chart color tags
ASSEMBLYNET-25. A color given as a string now can be a hex value: "#RRGGBB", "#RGB" or "#AARRGGBB", in addition to a color name ("red") and an ARGB integer. For example, <<backColor [item.Color]>> with "#FF0000" coming from data now applies red. Before, hex strings gave no color. A malformed one gives no color, like an unknown name.
<<foreach [s in statuses]>><<backColor [s.Color]>><<[s.Name]>><</backColor>>
<</foreach>>
With statuses whose colors are "#C6EFCE", "#FFEB9C", "#F00" and "LightGray", the four lines get the backgrounds C6EFCE, FFEB9C, FF0000 and D3D3D3.
Fixes
Missing Booleans of JSON, XML and CSV data
ASSEMBLYNET-155. Values of file data sources may be missing. A missing Boolean already counted as false in <<if>>, <<check>>, && and ||, but failed with a NullPointerException in the conditional operator and in the predicates of where, count, any, all and first:
<<[o.Paid ? "paid" : "due"]>> <<[orders.count(x => x.Paid)]>> <<foreach [o in orders.where(x => x.Paid)]>>...<</foreach>>
Such a value now counts as false there as well.
groupBy and distinct over nested objects, $id/$ref in JSON data
ASSEMBLYNET-157. groupBy(o => o.Customer) and select(o => o.Customer).distinct() over a nested object gave one group per row, because every access to a related object looked like a new value. Now:
- in JSON and XML data, nested objects are compared by value, including their own nested objects:
{"Name":"A"}and{"Name":"A"}make one group; - in a
DataSetof your own, rows are compared by identity: orders of the same customer row make one group, two customer rows with equal values stay two groups; - nothing changes for objects of your own classes.
JSON written by Json.NET with preserved references failed with a NullPointerException, because an object holding only $ref was lost on loading:
{ "Orders": [ { "Customer": { "$id": "1", "Name": "A" } }, { "Customer": { "$ref": "1" } } ] }
For example, orders 1 and 3 below hold equal customer objects:
{ "Orders": [
{ "Number": 1, "Paid": true, "Customer": { "Name": "Quayside Bistro" } },
{ "Number": 2, "Paid": false, "Customer": { "Name": "Harbor Lane Provisions" } },
{ "Number": 3, "Paid": null, "Customer": { "Name": "Quayside Bistro" } } ] }
This text template:
<<foreach [g in ds.Orders.groupBy(o => o.Customer)]>><<[g.key.Name]>>: <<[g.count()]>> order(s), paid: <<[g.count(o => o.Paid)]>>
<<foreach [o in g]>> #<<[o.Number]>> <<[o.Paid ? "paid" : "due"]>>
<</foreach>><</foreach>>
JsonDataLoadOptions options = new JsonDataLoadOptions();
options.setAlwaysGenerateRootObject(true);
new DocumentAssembler().assembleDocument("orders.txt", "report.txt",
new DataSourceInfo(new JsonDataSource("orders.json", options), "ds"));
now gives one group per customer:
Quayside Bistro: 2 order(s), paid: 1
#1 paid
#3 due
Harbor Lane Provisions: 1 order(s), paid: 0
#2 due
$ref now gives a copy of the object it names, so <<[o.Customer.Name]>>, orderBy and groupBy work. Objects with different $id values are different objects even if their values are equal. An object may refer to an object holding it (Order.Customer to the customer of the order): its simple values are available, and its member that would repeat the path (Order.Customer.Order) gives the parent object. A $ref without a matching $id is ignored. Data that would grow over one million nodes because of references fails with a clear error.
License.setLicense(InputStream) with a stream that has been read
ASSEMBLYNET-142. A license loaded from a stream was read from the current position of the stream. A stream that had already been read, such as a ByteArrayInputStream used to license another GroupDocs product or a FileInputStream positioned at its end, gave nothing to read, and setLicense failed with “Unexpected EOF in prolog”, while other GroupDocs products accepted the same stream.
A ByteArrayInputStream is now read from its mark, which is its beginning unless the caller has set another one, and a FileInputStream from position 0. Other streams are read from their current position as before.
ByteArrayInputStream license = new ByteArrayInputStream(Files.readAllBytes(Paths.get("GroupDocs.Assembly.lic")));
// ... the stream is read to its end, for example to license another GroupDocs product
new License().setLicense(license); // works without license.reset()
Metered consumption is reported when an operation completes
ASSEMBLYNET-143. Consumption of a metered license was uploaded by a background thread only when an upload threshold was reached, so it was reported after the call had returned, or lost when a short-lived process exited. It is now reported when assembling a document or generating a preview completes.
Text and HTML reports lost non-Latin data of ASCII-only templates
ASSEMBLYNET-158. A text or HTML template made of ASCII characters only, with no byte order mark, was taken for a windows-1252 one, so the report was written in that code page whatever the default charset of the JVM: Café was written as 43-61-66-E9 and Привет as ??????. Such a template now gives a UTF-8 report without a byte order mark. A template with a byte order mark, with non-ASCII characters, or with an encoding declared by <meta charset> or an XML declaration keeps its encoding as before.
Barcode failed when the font of its text box is not installed
ASSEMBLYNET-160. A QR code, and other barcode types whose code text is drawn by the engine (DataMatrix, Aztec and others), failed with NullPointerException: trueTypeFont if the font of the text box holding the tag was not installed, typically Calibri on Linux. The code text now uses a fallback font: Arial, Liberation Sans, DejaVu Sans, Carlito, Calibri, Times New Roman, then any font of the system. If the system has no fonts at all, the barcode is generated without its text.
MSG report kept the template’s conversation topic
ASSEMBLYNET-159. Tags in the subject of an MSG template were replaced in PR_SUBJECT and PR_NORMALIZED_SUBJECT, but PR_CONVERSATION_TOPIC kept the tag, for example <<[subject]>>. Outlook threads messages by this property, and some clients show it. Tags in the conversation topic are now processed as well. EML messages have no such property and are not affected.
Clear error for a doc tag in spreadsheet, presentation and text templates, no empty file after a failure
ASSEMBLYNET-152. A <<doc>> tag in a template of these formats failed with “Tag ‘doc’ is not well-formed. Token ‘doc’ is unexpected.”, which pointed to the syntax of the tag. The error now says that the tag is not supported for the template format:
Tag 'doc' is not supported for this template format. Documents can be inserted into Word Processing templates and email templates with HTML or RTF bodies only.
DocumentAssembler.assembleDocument with an output path also left an empty file there when it failed with an exception. The file is now removed.
Extra empty paragraph after HTML content at the end of a paragraph
ASSEMBLYJAVA-354. An -html expression tag ending its paragraph left an empty paragraph after HTML ending with a block element, such as <p>A</p><p>B</p>. The template paragraph now ends with the last HTML paragraph:
| Template paragraph | Before | Now |
|---|---|---|
<<[html] -html>> | A, B, empty paragraph | A, B |
Text: <<[html] -html>> | Text:, A, B, empty paragraph | Text:, A, B |
Text: <<[html] -html>>End | Text:, A, B, End | unchanged |
HTML ending with a table keeps the paragraph after the table. This is the fix of ASSEMBLYNET-182 made in GroupDocs.Assembly for .NET 26.11.
GS1 barcodes with Aspose.BarCode 26.10
ASSEMBLYJAVA-353. With BarcodeSettings.setUseAutoCorrection(true), the default, a code text that does not fit the barcode type is corrected rather than rejected. Aspose.BarCode 26.10 stopped doing that for GS1 barcodes with a fixed-length key, so a template such as <<barcode ["04901234567"] -ean14>> would have failed with the new engine. GroupDocs.Assembly now corrects a code text made of digits only itself, the way earlier versions of the engine did, so the barcodes are the same as in 26.10.1, except DataBar Expanded and DataBar Expanded Stacked (see Backward incompatible changes):
- EAN-14 and SCC-14: the first 13 digits, padded with zeros on the right; the engine adds the check digit;
- SSCC-18: the first 17 digits, padded the same way;
- DataBar: the
(01)application identifier, followed by the first 13 digits padded the same way and their check digit.
Code texts with other characters, such as (01)04901234567896(10)ABC, are passed to the engine as they are. With the auto-correction off, a code text that does not fit is rejected, as before.
Updates
Aspose engines upgraded to 26.10
ASSEMBLYJAVA-353. GroupDocs.Assembly for Java 26.10.1 bundled Aspose libraries from early 2026, so vulnerabilities fixed in them since then were reported against GroupDocs.Assembly by security scanners. The bundled engines are now:
| Engine | 26.10.1 | 26.11 |
|---|---|---|
| Aspose.Words for Java | 26.3 | 26.10.1 |
| Aspose.Cells for Java | 26.3 | 26.10 |
| Aspose.Slides for Java | 26.2 | 26.10 |
| Aspose.Email for Java | 26.1 | 26.9 |
| Aspose.BarCode for Java | 26.6 | 26.10 |
The jar also embeds FreeHEP VectorGraphics, which Aspose.Words uses to render pages and EMF images. Like the other embedded libraries, it is renamed into an internal package and registers no services with the JVM. The published POM still declares no dependencies.
Public API and backward incompatible changes
New public API
| Type | Member |
|---|---|
JsonDataSource | JsonDataSource(String jsonPath, String jsonSchemaPath) |
JsonDataSource | JsonDataSource(String jsonPath, String jsonSchemaPath, JsonDataLoadOptions options) |
JsonDataSource | JsonDataSource(InputStream jsonStream, InputStream jsonSchemaStream) |
JsonDataSource | JsonDataSource(InputStream jsonStream, InputStream jsonSchemaStream, JsonDataLoadOptions options) |
LoadSaveOptions | getSkipExternalResources(), setSkipExternalResources(boolean) (default true) |
LoadSaveOptions | getTrustTemplateResources(), setTrustTemplateResources(boolean) (default true) |
LoadSaveOptions | getWhitelistedResources(), setWhitelistedResources(List<String>) |
LoadSaveOptions | getExternalResourceHandler(), setExternalResourceHandler(ExternalResourceHandler) |
ExternalResourceHandler | onLoading(ExternalResourceLoadingArgs args) |
ExternalResourceLoadingArgs | getUri(), getOrigin(), isSkipped(), setSkipped(boolean), getData(), setData(byte[]) |
ExternalResourceOrigin | TEMPLATE, DATA, toString(int) |
DocumentAssembler | generatePreview(String documentPath, PreviewOptions previewOptions) |
DocumentAssembler | generatePreview(InputStream documentStream, PreviewOptions previewOptions) |
PreviewOptions | PreviewOptions(CreatePageStream), PreviewOptions(CreatePageStream, ReleasePageStream); getters and setters of CreatePageStream, ReleasePageStream, PreviewFormat, PageNumbers, Width, Height, Resolution |
PreviewFormats | PNG, JPEG, BMP, toString(int) |
CreatePageStream | OutputStream invoke(int pageNumber) |
ReleasePageStream | void invoke(int pageNumber, OutputStream pageStream) |
Removed public API
| Type | Member |
|---|---|
ICustomFontsHandler | resetFontSources() |
ICustomFontsHandler is implemented by the library itself, and no public method takes or returns it. To reset the custom fonts, call FontSettings.resetFontSources(), which is not changed.
Backward incompatible changes
<<image [item.PhotoUrl]>> where PhotoUrl is an http or https URI. Add the hosts to LoadSaveOptions.getWhitelistedResources(), or call LoadSaveOptions.setSkipExternalResources(false) to keep the previous behavior. Resources referenced by the template itself are loaded as before.- A call such as
new JsonDataSource(path, null)with a literalnullsecond argument no longer compiles: “reference to JsonDataSource is ambiguous”. Cast the argument:new JsonDataSource(path, (JsonDataLoadOptions) null). Compiled applications are not affected. - Reports of ASCII-only text and HTML templates without a byte order mark are now in UTF-8 instead of
windows-1252(ASSEMBLYNET-158). Only non-ASCII data is written differently, and an MHTML report saved from such a template declarescharset="UTF-8". To keep a single-byte code page, declare it in the template (<meta charset>in HTML) or add a non-ASCII character in that encoding. groupByanddistinctover nested objects of JSON, XML andDataSetdata now merge equal objects, where they gave one group per row (ASSEMBLYNET-157).- The text of the exception for a
doctag in spreadsheet, presentation and text templates has changed (ASSEMBLYNET-152). The exception type is the same. - An
-htmltag ending its paragraph no longer leaves an empty paragraph after HTML ending with a block element (ASSEMBLYJAVA-354). To keep a blank line, end the HTML with<p> </p>. - A DataBar Expanded or DataBar Expanded Stacked barcode with a code text of digits only now encodes it as a GTIN with the
(01)application identifier, as the other DataBar types do, which makes it a valid GS1 element string. 26.10.1 encoded the digits as they were. Only the first 13 digits are used, so give longer GS1 data with its application identifiers, such as(01)04901234567896(10)ABC; such a code text is encoded as it is (ASSEMBLYJAVA-353). ICustomFontsHandler.resetFontSources()is removed; see above.
Differences from GroupDocs.Assembly for .NET 26.11
- Byte order mark of text reports. A text or HTML template with a byte order mark gives a report in the same encoding, without the byte order mark. GroupDocs.Assembly for .NET writes the byte order mark to the report as well. The Java behavior is not new.
- Date and time values with
Zor an offset. A value of JSON or CSV data such as"2024-11-03T23:00:00Z"is ajava.util.Dateof that exact instant, and a format pattern prints it in the default time zone of the JVM:<<[d]:"yyyy-MM-dd HH:mm">>prints2024-11-04 01:00in a JVM running at UTC+2 and2024-11-03 15:00inAmerica/Los_Angeles. In .NET the result does not depend on the time zone of the server. To get output independent of the server, run the JVM with a fixed time zone, for example-Duser.timezone=UTC. Date-only values such as"2020-01-01"keep their date in any time zone. Unlike .NET before 26.11 (ASSEMBLYNET-151), Java has never shifted them. - Missing values. Values of data are regular Java classes, and a missing value is
null. The part of ASSEMBLYNET-155 that lets .NET templates useNullable<T>values without.Valuedoes not apply to Java, and Boolean values of data were already usable directly as conditions. - Enumerations and delegates.
ExternalResourceOriginandPreviewFormatsare classes ofintconstants, like the other enumerations of the Java API.CreatePageStreamandReleasePageStreamare functional interfaces with aninvokemethod, so lambdas fit. - .NET only. The
System.Security.Cryptography.Pkcsupdate (ASSEMBLYNET-144) and the .NET Framework 4.8 build (ASSEMBLYNET-147) do not apply to Java. Of ASSEMBLYNET-143, only the reporting of consumption applies: the Java version already used the metered licensing client shared with other GroupDocs products.
Important notes for generated documents
Because the underlying engines were refreshed, regenerated documents may differ at the byte level while remaining visually and functionally equivalent: engine version stamps, paragraph identifiers of Word documents, PNG encoding of inserted images, MIME boundaries of email messages. Consumers who byte-compare generated output against stored baselines should refresh those baselines after upgrading.