Slow and wrong convertion pdf to bitmap

Hello,

Im working with Visual Studio 2008, .NET 3.5 SP1 and aspose 5.0.01.

Im having some problems while working with the pdf attached to this post. It takes around 5-8s to decode every single page (while decoding pages out of another documents is much quicker).
Additonally I have noticed that the first page of the document is displayed with some errors (missing letters).
I haven’t had any problems while working with another pdf files.

Greetings,

Janis

Hi Janis,

Can you please share whether you’re using DocodePage or DecodeAllPages method of PdfViewer class or you’re using PdfConverter class to convert the PDF file to images? If you could share a sample code snippet you’re using at your end that would be helpful in understanding and reproducing your particular issue.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

The sample code looks like that:

var lViewer = new PdfViewer();
Aspose.Pdf.Kit.Settings.Strategy = FileProcessingStrategy.OptimizePerformance;

lViewer.OpenPdfFile(filePath);
var pageCounter = lViewer.PageCount;
for(int i = 0; i < pageCounter; i++)
{
//Taking start time
var decodedPage = lViewer.DecodePage(i);
//Taking end time
//some other operations on decodedPage…
}

So that’s how the process at my end looks like. I have problem only with this one particular document, attached to my post above. All other document are decoded much faster without any errors.

Regards,

Janis

Hi Janis,

Thank you very much for sharing further details. I have reproduced these issues and logged them as shown below:

PDFKITNET-24195 - Slow PDF to Image Conversion
PDFKITNET-24196 - The image of the first page missing characters

Our team will look into these issues and you’ll be notified via this forum thread once they’re resolved.

We’re sorry for the inconvenience.
Regards,

Hello Shahzad,


Thank you for the response,

Im looking forward to hearing from you,

Regards,

Janis

Hello,

I just noticed that the issues were not fixed in the newest Release of Aspose library (5.1). Is it possible that they will be fixed in the next release?

I would appreciete your response,

Kind regards,

Janis

Hi Janis,

I’m sorry to inform you that these issues are not yet resolved; however, I have asked our team to share the ETA of these issues. You’ll be notified via this forum thread as soon as the ETA is available.

We’re sorry for the inconvenience.
Regards,

Hello,

Thank you for your reply, I would be grateful for the information about ETA,

Regards,

Janis

Hi Janis,

Currently, our team is investigating the time and effort required for these issues. Please spare us some time and you’ll be updated with the results the earliest possible.

We appreciate your cooperation.
Regards,

Hello Shahzad,

of course I understand. I would be just grateful if you could share with me if it might be fixed in the future,

Im looking forward to hearing from you,

Kind regards,

Janis

Hi Janis,

Our team has further looked into these issues and I would like to share with you that the fix for these issues will be available at the end of August 2011. You’ll be notified via this forum thread as soon as the fix is available.

If you find any further questions, please do let us know.
Regards,

Hello,

I just wanted to ask if the issues regarding the pdf converter have been fixed by now?

Cheers,

Janis

Hi Janis,

I’m sorry to inform you that these issues are not yet resolved. We have to reschedule the issues due to the complexity involved. We’re very much hopeful that these issues will be resolved during November 2011.

We’re sorry for the inconvenience.
Regards,

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


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

Hello,

This worked for me great! Thank you! However I’m having problems with different pdf files. I attached one of them to the post. Problem is that when I try to convert them to image, the image I get is just a blank page.

The way Im using Aspose library hasn’t changed since I posted here for the first time. So I still use it like:

var lViewer = new PdfViewer();
Aspose.Pdf.Kit.Settings.Strategy = FileProcessingStrategy.OptimizePerformance;

lViewer.OpenPdfFile(filePath);
var pageCounter = lViewer.PageCount;
for(int i = 0; i < pageCounter; i++)
{
//Taking start time
var decodedPage = lViewer.DecodePage(i);
//Taking end time
//some other operations on decodedPage…
}

Now Im using Visual Studio 2010, .NET 4.0, Im working under windows 7.

PS. I could not attach 2 pdf files to this post, which also cause problems on converting. Both are over 40MB, maybe that’s why I could not uplad them on here.

Hi,


Thanks for using our products. I have tested the scenario using Aspose.Pdf for .NET 6.4.2 and as per my observations, the PDF to image conversion process is taking a bit longer time as compare to Aspose.Pdf.Kit for .NET. For the sake of correction, I have logged this problem as PDFNEWNET-32106 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Besides this, I have observed that the output image file is being generated without any issue. Please take a look over the attached image file that I have generated using Aspose.Pdf for .NET 6.4.2.

Hi,


In case you are facing some issues while uploading documents directly to aspose server, I would suggest you to upload the documents over some file sharing server and share the URL. You may use Dropbox or Google Drive for the purpose.

Hi,

Thank you for you response. I can’t reproduce the issue with the file I attached any more, it’s ok now. The files which I have problems with are:

https://apps.banckle.com/file/g/?v=K8b0KPplWHy&f=3.pdf
https://apps.banckle.com/file/g/?v=rDNyxpvq6H0&f=6.pdf

They both are quite big. As for 3.pdf it just doesn’t get converted no matter how long I wait, while 6.pdf gets converted to the blank image. Is there anything I can do there?

Hi Janis,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the PDF files.

Regarding 3.pdf, I am able to convert the file to image using the following code(attached is the resultant PDF):

//create PdfConverter object

PdfConverter objConverter = new PdfConverter();

//bind input pdf file

objConverter.BindPdf("E:/AP Data/3.pdf");

//initialize the converting process

objConverter.DoConvert();

//check if pages exist and then convert to image one by one

while (objConverter.HasNextImage())

objConverter.GetNextImage("E:/AP Data/" + DateTime.Now.Ticks.ToString() + ".jpg",

System.Drawing.Imaging.ImageFormat.Jpeg);

//close the PdfConverter object

objConverter.Close();

Regarding 6.pdf, I am able to reproduce the issue. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-32145. You will be notified via this forum post regarding any update against your issue.

Sorry for the inconvenience,

Hi Nausherwan,

Thank you for your reply. Regarding 3.pdf you’re right - I didn’t wait long enough.

Regarding 6.pdf - could you give me an estimate when this could be fixed?

Regards,

Janis