GroupDocs.Assembly for .NET 25.6 Release Notes

Major Features

The GroupDocs.Assembly for .NET 25.6 release introduces a major feature that allows developers to preserve and customize font usage during document generation. This enhancement enables the specification of custom font directories, improving flexibility and document fidelity.

Full List of Features Covering all Changes in this Release

KeySummaryCategory
ASSEMBLYNET-53Support for custom font directoriesFeature
ASSEMBLYNET-55Document fonts are being substituted with standard system fonts on Linux environmentInvestigation

Public API and Backward Incompatible Changes

How to Customize Font Directory During Document Assembly

The following code snippet demonstrates how to set a custom font directory when assembling a document and exporting it to PDF, ensuring that fonts are rendered properly and unnecessary substitution with system fonts is avoided:

var source = "arial.docx";
var target = "arial_out.pdf";
var fontsDir = "/home/user/custom-fonts-dir";
var data = "data.json";

var options = new LoadSaveOptions(FileFormat.Pdf);
var dataSourceInfo = new DataSourceInfo(new JsonDataSource(data));

var assembler = new DocumentAssembler();
assembler.AssembleDocument(source, target, options, dataSourceInfo);