SnapshotSettingsPdfExtensions Class
Provides extension methods for SnapshotSettings to enable PDF snapshot testing based on Meziantou.Framework.Pdf.
public static class SnapshotSettingsPdfExtensionsMethods
| Name | Description |
|---|---|
| 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.csRegisters 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
snapshotSettingsSnapshotSettingssettingsPdfSnapshotSettings?- The rendering and metadata settings. When
null, the default settings are used. imageComparisonSettingsImageComparisonSettings?- The comparison settings of the pages. When
null, a comparer already registered forSnapshotType.Png, for instance byAddImaging, is kept, and exact pixel comparison is used otherwise.