We’re happy to announce GroupDocs.Conversion for .NET 25.10, available as of Outubro 2025.
This minor release brings a set of page‑layout enhancements, new load‑option capabilities, and a handful of critical bug fixes. The most visible change is a public API refactor that groups margin and size settings into dedicated objects, improving consistency across all conversion options.

Novidades desta versão

ID Recurso
CONVERSIONNET‑8032 Adicionar suporte para definir tamanho da página, margens e orientação em EmailLoadOptions antes da conversão.
CONVERSIONNET‑8013 Adicionar suporte para definir margens da página em SpreadsheetOptions antes da conversão.
CONVERSIONNET‑8012 Adicionar suporte para definir tamanho da página em SpreadsheetOptions antes da conversão.
CONVERSIONNET‑8009 Adicionar suporte para definir tamanho da página em TxtLoadOptions e WordProcessingLoadOptions antes da conversão.
CONVERSIONNET‑8008 Adicionar suporte para definir margens da página em TxtLoadOptions e WordProcessingLoadOptions antes da conversão.

These additions let you fine‑tune the layout of the source document before the conversion step, giving you tighter control over the appearance of the resulting files.

Refatoração da API – Configurações de Layout de Página (Alterações Quebradoras)

⚠️ ALTERAÇÃO QUEBRADORA (effective v26.1) – Twenty individual margin/size properties are deprecated and will be removed in the next major version.
The new model introduces two helper objects that replace the old scalar properties:

Classe afetada Propriedades obsoletas Substituição
PdfConvertOptions (7) MarginTop, MarginBottom, MarginLeft, MarginRightMarginSettingsPageSize, PageWidth, PageHeightSizeSettings MarginSettings (PageMarginOptions), SizeSettings (PageSizeOptions)
WordProcessingConvertOptions (7) Same as PDF Same as PDF
EBookConvertOptions (3) PageSize, PageWidth, PageHeightSizeSettings SizeSettings
CadConvertOptions (3) PageSize, PageWidth, PageHeightSizeSettings SizeSettings

Novas classes auxiliares

public class PageMarginOptions
{
    public float? Top { get; set; }
    public float? Bottom { get; set; }
    public float? Left { get; set; }
    public float? Right { get; set; }
}
public sealed class PageSizeOptions
{
    public PageSize PageSize { get; set; }
    public float PageWidth { get; set; }   // Setting this forces PageSize = PageSize.Custom
    public float PageHeight { get; set; }  // Setting this forces PageSize = PageSize.Custom
}

Guia de migração

Migrando margens de página

Abordagem antiga (obsoleta)

var options = new PdfConvertOptions
{
    MarginTop    = 10,
    MarginBottom = 10,
    MarginLeft   = 20,
    MarginRight  = 20
};

Nova abordagem (recomendada)

var options = new PdfConvertOptions
{
    MarginSettings = new PageMarginOptions
    {
        Top    = 10,
        Bottom = 10,
        Left   = 20,
        Right  = 20
    }
};

Migrando configurações de tamanho de página

Abordagem antiga (obsoleta)

// Predefined size
var pdfOptions = new PdfConvertOptions
{
    PageSize = PageSize.A4
};

// Custom dimensions
var wpOptions = new WordProcessingConvertOptions
{
    PageWidth  = 612, // points (Letter width)
    PageHeight = 792  // points (Letter height)
};

Nova abordagem (recomendada)

// Predefined size
var pdfOptions = new PdfConvertOptions
{
    SizeSettings = new PageSizeOptions
    {
        PageSize = PageSize.A4
    }
};

// Custom dimensions
var wpOptions = new WordProcessingConvertOptions
{
    SizeSettings = new PageSizeOptions
    {
        PageWidth  = 612,   // points
        PageHeight = 792    // points
        // PageSize automatically becomes PageSize.Custom
    }
};

Adopting the new objects eliminates ambiguity (the previous API mixed points and pixels) and aligns all conversion options under a common, discoverable model.

Correções e aprimoramentos

ID Tipo de problema Descrição
CONVERSIONNET‑8031 Bug PreserveOriginalDate set to false was previously ignored on .NET.
CONVERSIONNET‑8023 Bug Fluent‑syntax conversions failed when no explicit convert options were supplied.
CONVERSIONNET‑8020 Bug WordProcessing conversion threw an unhandled exception due to missing Microsoft.Extensions.DependencyInjection (v8.0.0.0).
CONVERSIONNET‑8006 Bug WordProcessingConvertOptions treated PageWidth/PageHeight as pixels instead of points.
CONVERSIONNET‑8005 Bug PdfConvertOptions.Margin* properties were not respected during PDF conversion.

These fixes tighten reliability across the most common conversion scenarios and bring the library in line with expected .NET behavior.

Como obter a atualização

  • NuGet – Atualize para o pacote GroupDocs.Conversion mais recente:

    dotnet add package GroupDocs.Conversion --version 25.10
    

    (The same package works for .NET 6+, .NET Framework 4.6.2, and .NET Core.)

  • Direct download – Assemblies for both .NET and .NET Framework are available on the release page:
    https://releases.groupdocs.com/conversion/net/25-10/

Recursos