/// <summary> /// Adds a PdfScriptObject to the page that draws an image, /// stretched to the given width and height. /// </summary> public static PdfObjectRef DrawImage(this PdfPageWriter page, double x, double y, Image image, double width, double leftRotationDegrees = 0.0) { var imageRef = page.DocumentWriter.AddImage(image); return(page.DrawImageRef(x, y, imageRef, width, leftRotationDegrees)); }
/// <summary> /// Adds a PdfScriptObject to the page that draws an image, /// scaled to the given width and height. /// </summary> public static PdfObjectRef DrawImage(this PdfPageWriter page, double x, double y, Image image, double width, double height, PdfImagePlacement imagePlacement, PdfImageRotation rotation = PdfImageRotation.None) { var imageRef = page.DocumentWriter.AddImage(image); return(page.DrawImageRef(x, y, imageRef, width, height, imagePlacement, rotation)); }