SnapshotSettingsPdfExtensions Class

Provides extension methods for SnapshotSettings to enable PDF snapshot testing based on Meziantou.Framework.Pdf.

public static class SnapshotSettingsPdfExtensions

Methods

NameDescription
SnapshotSettings.AddPdf(PdfSnapshotSettings?, ImageComparisonSettings?)Registers the serializer of PDF documents (see SnapshotSerializerCollection.AddPdfSerializer) and an ImageComparer for SnapshotType.Png, so the pages are compared by pixels.

SnapshotSettings.AddPdf(PdfSnapshotSettings?, ImageComparisonSettings?)

SnapshotSettingsPdfExtensions.cs

Registers the serializer of PDF documents (see SnapshotSerializerCollection.AddPdfSerializer) and an ImageComparer for SnapshotType.Png, so the pages are compared by pixels.

extension(SnapshotSettings snapshotSettings)
{
    public void AddPdf(PdfSnapshotSettings? settings = null, ImageComparisonSettings? imageComparisonSettings = null)
}

Parameters

snapshotSettings SnapshotSettings
settings PdfSnapshotSettings?
The rendering and metadata settings. When null, the default settings are used.
imageComparisonSettings ImageComparisonSettings?
The comparison settings of the pages. When null, a comparer already registered for SnapshotType.Png, for instance by AddImaging, is kept, and exact pixel comparison is used otherwise.