Free Support Forum - aspose.com

Converting PDF to images - White Images when converting

Hi,

I have a problem converting a PDF filo into images. When I convert the first page of the PDF to image, the process works correctly, but from the second page, all images created by the process are white images.

What could be causing the error? The PDF is displayed correctly so you do not seem to be corrupt ...

Here's the code I use to do the conversion:

PdfConverter converter = new PdfConverter();

converter.BindPdf(filePath);

converter.DoConvert();

try

{

while (converter.HasNextImage())

{

string imagePath = Path.Combine(dir, fileName + "OriginalSize_" + pageCount.ToString() + ".jpg");

converter.GetNextImage(imagePath, ImageFormat.Jpeg);

pageCount++;

}

}

catch (Exception ex)

{

}

thanks in advance

Hi Guillermo,

Please share the problematic input PDF file with us, so we could test the issue at our end. You’ll be updated with the resolution accordingly.

We’re sorry for the inconvenience.
Regards,

Unfortunately, I can’t share the document because it contains confidential information. Anyway, my colleagues are trying to give me a document which is producing the same effect and does not contain protected information.
<SPAN title="" style=“BACKGROUND-COLOR: #fff” uc="I will return to get in touch with you when I have a document that can be shared.

" tc=“Me volveré a poner en contacto con vosotros en cuanto tenga un documento que pueda compartir.” closure_uid_4naia9=“385”><SPAN title="" uc="I’ll contact you again as I have a document that can be shared.

" tc=“yo me pondré en contacto con vosotros de nuevo en cuanto yo tenga un documento que pueda compartir.” closure_uid_4naia9=“560”>I’ll contact you again as I have a document that can be shared.

<SPAN title="" style=“BACKGROUND-COLOR: #fff” uc="I will return to get in touch with you when I have a document that can be shared.

" tc=“Me volveré a poner en contacto con vosotros en cuanto tenga un documento que pueda compartir.” closure_uid_4naia9=“385”><SPAN title="" uc="I’ll contact you again as I have a document that can be shared.

" tc=“yo me pondré en contacto con vosotros de nuevo en cuanto yo tenga un documento que pueda compartir.” closure_uid_4naia9=“560”>


Once again, thank you very much for the support.

Guillermo

Good evening,

I attach a pdf document that is causing problems. <SPAN title="" style="BACKGROUND-COLOR: #fff" uc="In this case all the pages of pdf images become black when converting to PDF to image. <p>" tc=“En este caso todas las páginas del pdf se convierten en imagenes negras al realizar la conversión de pdf a imagen.” closure_uid_q3ebi1=“29”>In this case all the pages of pdf become black images when converting from PDF to image… I hope this helps to find a solution to our problem.<BR><BR></SPAN><SPAN title="" uc="Thanks again</p> <p>" tc=“Gracias una vez más,” closure_uid_q3ebi1=“44”>Thanks again,</SPAN></SPAN></P></p> <P><SPAN class=medium_text><SPAN title="" uc="Thanks again <p>" tc=“Gracias una vez más,” closure_uid_q3ebi1=“44”></SPAN></SPAN> </P></p> <P><SPAN class=medium_text><SPAN title="" uc="Thanks again <p>" tc=“Gracias una vez más,” closure_uid_q3ebi1=“44”></SPAN></SPAN> </P></p> <P><SPAN class=medium_text><SPAN title="" uc="Thanks again <p>" tc=“Gracias una vez más,” closure_uid_q3ebi1=“44”>Guillermo</P></p> <P><BR><BR></P></SPAN></SPAN>

Hi Guillermo,

I have tested this file using latest hot fix at my end but couldn’t notice any issue. Please download the latest hot fix from this link and try it at your end.

If you still find any issue, please do let us know.
Regards,


I still have the same problem. <SPAN title="" style=“BACKGROUND-COLOR: #fff” tc=“El hotfix no ha cambiado nada la situación actual.” uc="The hotfix has not changed the situation.

" closure_uid_c82i2a=“62”>The hotfix has not changed the situation. :frowning:

The application is a winform app, it is developed with .NET Framework 2.0 and running on Windows Server 2003…

Hi <span title="" uc=“Thanks again” tc="Gracias

una vez más," closure_uid_q3ebi1=“44”>Guillermo,

I have again tested this file on Windows Server 2003 using a Windows Form application with .NET Framework 2.0, and the result is fine at my end. Can you please make sure that you’re using the DLL 4.5.0.1 in your application? Please remove any existing reference to Aspose.Pdf.Kit, build your project without adding any other reference and then add reference to the version 4.5.0.1 and rebuild the project.

I hope this helps. If it still doesn’t resolve your issue then please share a small sample project with us, which can reproduce the issue at our end.

We’re sorry for the inconvenience.
Regards,

Guillermo