PeachPDF

PeachPDF.Layout.IContainer

IContainer.Image Method

Overloads  
Image(byte[]) Places an image loaded from raw bytes. Terminal - may be called at most once.
Image(PdfImage) Places a reusable PdfImage - pass the same instance to more than one container to place it in multiple places without reloading/redecoding its source. Works for a shared SVG source too - PdfImage detects the format automatically, same as the other overloads. Terminal - may be called at most once.
Image(string) Places an image loaded from a local file path. Terminal - may be called at most once.
Image(Func<PdfSize,byte[]>) Places an image generated on demand, at exactly this container’s own resolved size, once that size is known - generator receives it as a PdfSize. Requires this container to have (or inherit, via the default width:100%;height:100% this fills with) a definite size: an explicit Width(PdfLength)/Height(PdfLength) on it, or an ancestor that already has one - a container with no definite size anywhere in its ancestry throws System.InvalidOperationException once layout reaches it. Useful for a chart or other generated graphic that should render at its actual placed resolution rather than a guessed fixed one (mirrors QuestPDF’s own dynamic-image API). Terminal - may be called at most once.
Image(Stream) Places an image read fully from a stream. Terminal - may be called at most once.
Image(Uri) Places an image loaded over the network. Terminal - may be called at most once.

IContainer.Image(byte[]) Method

Places an image loaded from raw bytes. Terminal - may be called at most once.

void Image(byte[] data);

Parameters

data System.Byte[]

IContainer.Image(PdfImage) Method

Places a reusable PdfImage - pass the same instance to more than one container to place it in multiple places without reloading/redecoding its source. Works for a shared SVG source too - PdfImage detects the format automatically, same as the other overloads. Terminal - may be called at most once.

void Image(PeachPDF.PdfImage image);

Parameters

image PdfImage

IContainer.Image(string) Method

Places an image loaded from a local file path. Terminal - may be called at most once.

void Image(string filePath);

Parameters

filePath System.String

IContainer.Image(Func<PdfSize,byte[]>) Method

Places an image generated on demand, at exactly this container’s own resolved size, once that size is known - generator receives it as a PdfSize. Requires this container to have (or inherit, via the default width:100%;height:100% this fills with) a definite size: an explicit Width(PdfLength)/Height(PdfLength) on it, or an ancestor that already has one - a container with no definite size anywhere in its ancestry throws System.InvalidOperationException once layout reaches it. Useful for a chart or other generated graphic that should render at its actual placed resolution rather than a guessed fixed one (mirrors QuestPDF’s own dynamic-image API). Terminal - may be called at most once.

void Image(System.Func<PeachPDF.PdfSize,byte[]> generator);

Parameters

generator System.Func<PdfSize,System.Byte[]>

IContainer.Image(Stream) Method

Places an image read fully from a stream. Terminal - may be called at most once.

void Image(System.IO.Stream stream);

Parameters

stream System.IO.Stream

IContainer.Image(Uri) Method

Places an image loaded over the network. Terminal - may be called at most once.

void Image(System.Uri uri);

Parameters

uri System.Uri