PDF .NET Library Logo

Adding Images

The following code snippet creates a PDF document containing an image.

C# sample:

PDFDocument MyPDF = new PDFDocument ("image.pdf");

PDFImage jpgimage = new PDFImage ("..\\Resources\\images\\sample.jpg");

MyPDF.CurrentPage.Body.AddImage(jpgimage,293, 26);

MyPDF.Save();

Back to PDF Code Library