Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

PdfGraphics.DrawImage(Stream, PointF) Method

Draws an image at the specified location using the stream data.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v19.1.Drawing.dll

Declaration

public void DrawImage(
    Stream data,
    PointF location
)

Parameters

Name Type Description
data Stream

A Stream class descendant, specifying the stream with the image data.

location PointF

A PointF structure that represents the image location.

Remarks

This method renders an image with its original resolution (DPI).

To add an image to the page, you need to call one of the PdfGraphics.AddToPageForeground, PdfGraphics.AddToPageBackground, and PdfDocumentProcessor.RenderNewPage overload methods. Note that these methods accept DPI values as arguments.

The DPI values do not affect image quality and are used for coordinate transformation only (world coordinates to page coordinates). See the Coordinate Systems topic to learn more about the coordinate transformations.

Important

The PdfGraphics will produce vector graphics for the EMF+ metafiles only. If a metafile contains not only GDI+ commands, it will be rasterized and rendered as a bitmap.

See Also