We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDFViewer.DecodeAllPages Problem

Hello,

I am using the code below in a project to convert the pages of a PDF to Bitmaps. When I try it on the attached file(a 112 page PDF) it creates an array of 112 nodes, but only the first 66 nodes contain a bitmap. Therefore I only have images of the first 66 pages. I attached the PDF. Can you please take a look. This is an emaergency and I need a resolution as soon as possible.

Thank you

Dim imgs As Bitmap()

Dim pdf As PdfViewer = New PdfViewer()

pdf.OpenPdfFile(xFile)

imgs = pdf.DecodeAllPages()

Hi Edward,


Thanks for contacting support. I have tested the scenario while using Aspose.Pdf for .NET 6.4.2 and as per my observations, all the pages of PDF document are properly being converted into BMP images. Can you please try using the new version and in case you still face any problem, please share some details regarding your working environment. We apologize for your inconvenience.

[C#]

'create PdfConverter object
Dim objConverter As New PdfConverter()
'bind input pdf file
objConverter.BindPdf(“d:/pdftest/2ae452d7-bb40-43b2-b1f6-02fc3d6908bb.pdf”)
'initialize the converting process
objConverter.DoConvert()
'check if pages exist and then convert to image one by one
Do While objConverter.HasNextImage()
objConverter.GetNextImage(“E:\Temp” + DateTime.Now.Ticks.ToString() & “.bmp”, System.Drawing.Imaging.ImageFormat.Bmp)
Loop
’close the PdfConverter object
objConverter.Close()

For more information, please visit Convert PDF Pages to Different Image Formats (Facades)