Products
TallPDF.NET 4.0
Created
7/4/2014
Tags
Generate PDF Images

This code sample shows how to add a image to PDF in C#

// images paths string[] paths = new String[] { "pc.jpg", "handheld.jpg", "laptop.jpg" };

// add each image to the document as an image paragraph foreach ( string path in paths ) { // create an Image object from file Image image = new Image(path);

  // set layout parameters
  image.HorizontalAlignment = HorizontalAlignment.Center;
  image.Width = section.PageSize.Width / 3;
  image.SpacingAfter = 10;

  // add the image to the section
  section.Paragraphs.Add( image );

}

document.Write( file ); }]]>