PeachPDF

PeachPDF

PdfImage Class

A reusable, resolve-once image source for the declarative document-building API (CreateDocument(Action<IDocumentBuilder>, PdfGenerateConfig)) - pass the same instance to more than one IContainer.Image(PdfImage) call to place the same image (raster or SVG - the format is detected automatically, same as the other Image/Svg overloads) in multiple places without re-reading/redecoding its source for each placement. Mirrors QuestPDF’s own shared-image API (https://www.questpdf.com/api-reference/image/shared.html): decode/parse once, reuse the resolved result everywhere the same instance is placed.

public sealed class PdfImage

Inheritance System.Object → PdfImage

Methods  
FromBytes(byte[]) Loads an image from raw bytes (raster or SVG - the format is detected automatically).
FromFile(string) Loads an image from a local file path.
FromStream(Stream) Loads an image read fully from a stream (raster or SVG - the format is detected automatically).