Blank image

Hello ASPOSE team,


I have attached file ASPOSE PDF outputs blank image. Could you check it?

Thank you and best regards,
Atsuo Nakatani

Hello team,



This file is also.



Thank you,

Atsuo

Hi Atsuo,


Thanks for sharing sample file(s). Therefore for the better understanding of the problem, we will really appreciate if you please share some more details of the issue along with a sample code snippet. It will really help us to test the scenario in our environment and get back to you accordingly.


Best Regards,

Hello Asad,


I have attached the sample c# code to conver pdf to jpeg with ASPOSE.

Thank you,
Atsuo

Hi Atsuo,

Thanks for sharing code snippet. I have tried to use your code for PDF to JPEG conversion but I was unable to run the code as there are some variables with unknown values (i.e quality, readDpi, thumbMaxW, thumbMaxH).

However I have tried following code to convert your sample PDF document(s) into JPEG and able to reproduce the blank image issue at my side.

Aspose.Pdf.Document pdfDoc = new Aspose.Pdf.Document(dataDir + “Sample2.pdf”);

for (int pageCount = 1; pageCount <= pdfDoc.Pages.Count; pageCount++)

{

    using (FileStream imageStream = new FileStream(dataDir + "image" + pageCount + "_out" + ".jpg", FileMode.Create))

    {

        Resolution resolution = new Resolution(300);

        JpegDevice jpegDevice = new JpegDevice(resolution, 100);

        jpegDevice.Process(pdfDoc.Pages[pageCount], imageStream);

        imageStream.Close();

    }

}

For the purpose of investigation I have logged issue(s) as PDFNET-42396 and PDFNET-42397 in our issue tracking system for both input file(s). We will further look into the details of the issue(s) and keep you informed on the status within this forum thread. Please be patient and spare us a little time.

Moreover we will really appreciate if you please share a working code snippet which you are using for conversion process. It will help us in investigating the issues more precisely and accordingly. We are sorry for the inconvenience.

Best Regards,

Hello Asad,

Thank you for your update. Sorry for bother you.
I have sent only conversion portion in the method. I am going to send codes works fine from now on.

Best regards,
Atsuo

Hi Atsuo,


Thanks for your kind feedback. As shared earlier that it will really be helpful in investigation process if you please share a working code snippet (i.e with the values of the variable which were unknown in previously shared code). It will give us a better understanding about the parameters with which you want to generate the image file from PDF. We are sorry for the inconvenience.


Best Regards,

The issues you have found earlier (filed as PDFNET-42397) have been fixed in Aspose.PDF for .NET 19.7.

The issues you have found earlier (filed as PDFNET-42396) have been fixed in Aspose.PDF for .NET 21.11.