SnapshotSerializerCollectionPdfExtensions Class

Provides extension methods for SnapshotSerializerCollection to snapshot PDF documents page by page.

public static class SnapshotSerializerCollectionPdfExtensions

Methods

NameDescription
SnapshotSerializerCollection.AddPdfSerializer(PdfSnapshotSettings?)Registers a serializer that writes a PDF document, a PdfDocument or the bytes of a file (Byte[] or Stream) validated as SnapshotType.Pdf, as a JSON file of its metadata followed by one PNG snapshot per page. Register a comparer for SnapshotType.Png, such as SnapshotComparerCollection.AddImageComparer, to compare the pages by pixels.

SnapshotSerializerCollection.AddPdfSerializer(PdfSnapshotSettings?)

SnapshotSerializerCollectionPdfExtensions.cs

Registers a serializer that writes a PDF document, a PdfDocument or the bytes of a file (Byte[] or Stream) validated as SnapshotType.Pdf, as a JSON file of its metadata followed by one PNG snapshot per page. Register a comparer for SnapshotType.Png, such as SnapshotComparerCollection.AddImageComparer, to compare the pages by pixels.

extension(SnapshotSerializerCollection serializers)
{
    public void AddPdfSerializer(PdfSnapshotSettings? settings = null)
}

Parameters

serializers SnapshotSerializerCollection
settings PdfSnapshotSettings?
The rendering and metadata settings. When null, the default settings are used.