Bitmap originalImage = new Bitmap("D:/test.jpg");
MemoryStream stream = new MemoryStream();
originalImage.Save(stream, ImageFormat.Bmp);
Aspose.Pdf.Image myimage = new Aspose.Pdf.Image();
myimage.ImageStream = stream;
var document = new Document();
document.PageInfo.Width = originalImage.Width;
document.PageInfo.Height = originalImage.Height;
Page page = document.Pages.Add();
page.Paragraphs.Add(myimage);
//document.Save("8899.pdf"); //可以成功输出pdf文件
Resolution resolution = new Resolution(300);
var renderer = new Aspose.Pdf.Devices.JpegDevice(resolution, 100);
renderer.Process(document.Pages[1], "8899.jpg");
run these codes,it will generate a empty jpg file(8899),
if run //document.Save("8899.pdf")
first,then generate jpg file is ok!!!
what’s wrong?thanks!!!