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
Key | Summary | Category |
---|---|---|
ASSEMBLYNET-53 | Support for custom font directories | Feature |
ASSEMBLYNET-55 | Document fonts are being substituted with standard system fonts on Linux environment | Investigation |
Public API and Backward Incompatible Changes
This section outlines public API changes introduced in GroupDocs.Assembly for .NET 25.6. It includes new and deprecated methods, as well as internal behavioral changes that may affect existing implementations. Any regression or modified behavior is highlighted here.
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);