Dear Saskpower,
Thanks for your inquiry.
Please dispose the image, and then use the File.Move method.
Sample code for your kind reference.
- Code: Select all
PdfDocument doc = new PdfDocument();
PdfPageBase page = doc.Pages.Add();
PdfImage image = PdfImage.FromFile(@"F:\image\image1.jpg");
page.Canvas.DrawImage(image, 0, 0);
doc.SaveToFile("10314.pdf");
//dispose the image
(image as PdfBitmap).Dispose();
//move that image
File.Move(@"F:\image\image1.jpg", @"F:\image1.jpg");
If you still have issues, please provide us with the code you were using for testing.
Sincerely,
Betsy
E-iceblue support team