Problems with PDFConverter

We require Aspose.PDF.Kit to convert PDF documents to images in memory for preview purposes. We managed to achieve this using the PDFConverter class, but are experiancing the following issues:


1. Conversion is very slow.
2. Conversion sometimes hangs and blocks the worker thread.
3. Many PDF documents fail to convert. An exception is thrown when calling the PdfConverter.HasNextImage() method.

The exception text is:
"Input string was not in a correct format"

Can these issues be resolved?

Thanks for your help.

Hi Simon,

Are you using the latest version of Aspose.Pdf.Kit for .NET? Just so that you know, Aspose.Pdf.Kit 3.5.0.0 is the latest version and you can download it [here](http://www.aspose.com/community/files/51/file-format-components/aspose.pdf.kit-for-.net-and-java/default.aspx).

In case, it doesn’t resolve your problems, please share the sample code and PDF files with us so we could see which problems need detailed investigation, and for which some improvements can be suggested.

We’re sorry for the inconvenience.
Regards,

Hi Shahzad,


Here is the code that I am using:

PdfConverter convertor = new PdfConverter();
convertor.StartPage = PageNumber ; //Page number starting from 1
convertor.BindPdf(FilePath);
convertor.DoConvert();

MemoryStream imageStream = new MemoryStream();
if (convertor.HasNextImage())
{
convertor.GetNextImage(imageStream);
}

Bitmap bmp = new Bitmap(imageStream);
convertor.Close();


I will send the PDF files later.
Thank you,
Simon

Hi Shahzad,


Any updates regarding my previous post? We urgently need a solution to this.

Regards,
Simon

Hi Simon,

We’re sorry for the inconvenience.

I have tested the issue at my end with different PDF files, using Aspose.Pdf.Kit for .NET 3.5.0.0 and it worked very well; I have used the code snippet you shared. I couldn’t face any of the three issues you mentioned. In fact, I was waiting for the files from your end for further testing. Actually, sometimes problem occurs with particular PDF files, and once the problem is reproduced at our end the development team can look into the matter and fix it. Kindly, share the problematic PDF files for further investigation.

We appreciate your patience and cooperation.

Regards,

Hi Shahzad,


Thank you for your help. I have a document which is not converting for us, but I am unable to upload this to a public forum. The converter thread is using large amounts of RAM 150MB +, and maxing out the CPU. It remains in this state for many minutes until I kill the process from Task Manager.

The original Word document was ammended slightly and saved as another PDF document. This document is not causing any problems, even though it is very similar to the attached document.

I have two other documents which are giving me an “Invalid input string” exception. Unfortunately I cannot provide you with these either.

Thanks,
Simon

Hi Simon,

First of all, I would like to inform you that if you don’t want to share your documents with the public then you can mark the post as private. This way, the attachments will be accessible by the Aspose staff only. Secondly, In order to fix the issue, it is very important for us to reproduce the problem.

xmun:

The original Word document was ammended slightly and saved as another PDF document. This document is not causing any problems, even though it is very similar to the attached document.



I couldn’t find any document attached with the post; it seems like you attached some sample docuement. Did you?

I would really appreciate if you could share the documents with us and mark the post as private.
If you have any confusion, please do let us know.

Regards,

Hi Shahzad,


I have made a new private post under the title of “PDFConverter Problems”.
Thank you once again,

Simon

The issues you have found earlier (filed as 9732) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(4)