public void DocumentBuilderInsertImageSourceSize()
{
//ExStart
//ExFor:DocumentBuilder.InsertImage(String, RelativeHorizontalPosition, Double, RelativeVerticalPosition, Double, Double, Double, WrapType)
//ExId:DocumentBuilderInsertFloatingImageSourceSize
//ExSummary:Shows how to insert a floating image from a file or URL and retain the original image size in the document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Pass a negative value to the width and height values to specify using the size of the source image.
builder.InsertImage(MyDir + "LogoSmall.png",
RelativeHorizontalPosition.Margin,
200,
RelativeVerticalPosition.Margin,
100,
-1,
-1,
WrapType.Square);
//ExEnd
doc.Save(MyDir + @"\Artifacts\DocumentBuilder.InsertImageOriginalSize.doc");
}