I want to import an image from a file(png or jpeg) to a pdf document and I want to keep the size of the image as is if it is less than the width and height of the document.
If it is bigger I want to import it with its width and height resized proportionally.
I have this code sof ar
Image image = new Image();
image.IsInLineParagraph = false;
image.ImageStream = new FileStream(“C:\temp\images.jpg”, FileMode.Open);
Page page = pdfDocument.Pages.Add();
page.Paragraphs.Add(image);
pdfDocument.Save(“C:\temp\MyImagePDF.pdf”);