PdfDocument pdoc = new PdfDocument();
PdfPage page = pdoc.Pages.Add();
PdfPageLayer lay = page.Layers.Add();
PdfImage pimg = PdfImage.FromFile("logo.jpg");
//Translate the coordinate system’s to where you want draw the text position
lay.Graphics.TranslateTransform(100,100);
//Rotate the coordinate system’s
lay.Graphics.RotateTransform(-27);
//set 0,0 as location to draw the image in rotated position
lay.Graphics.DrawImage(pimg,0,0,pimg.Width,pimg.Height);
pdoc.Save("output.pdf");
pdoc.Close();
|