Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Trouble converting certain PDF

$
0
0
Hello,

I have trouble converting certain PDF file (attached) to bitmap. Following code results with empty bitmap. No exceptions are being thrown.
For other pdf's code works fine.

Stream inputStream = new FileStream(<FILEPATH>, FileMode.Open, FileAccess.Read);
Aspose.Pdf.Facades.PdfConverter conv = new Aspose.Pdf.Facades.PdfConverter();
conv.BindPdf(inputStream);
conv.StartPage = conv.EndPage = 1;
conv.Resolution = new Resolution(150);
conv.DoConvert();
MemoryStream ms = new MemoryStream();
conv.GetNextImage(ms, System.Drawing.Imaging.ImageFormat.Bmp);
Bitmap initialBitmap = new Bitmap(ms);

Best regards
Marcin JAROSZ

Viewing all articles
Browse latest Browse all 3131

Trending Articles