Convert large PDF file to image takes long time to complete

Hi Team

I am using Aspose.Pdf to convert a large pdf file to png format, the pdf file has only one page and the file size is 238MB. It took more than 6 minutes to complete and I am wondering if there is any other solution to improve the performance since it bring bad user experience to our end user now. Could you take a look at this ?

Here is the code:

Document pdfDocument = new Document(File.OpenRead(@“largefile.pdf”));

        for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
        {
            using (Stream imageStream = File.Open(@"image.png",FileMode.Create))
            {
                var pageNumber = 1;
                JpegDevice jpegDevice = new JpegDevice((int)((pdfDocument.Pages[pageNumber].MediaBox.Width + pdfDocument.Pages[pageNumber].PageInfo.Margin.Left + pdfDocument.Pages[pageNumber].PageInfo.Margin.Right) * 150 / 100),
                    (int)((pdfDocument.Pages[pageNumber].MediaBox.Height + pdfDocument.Pages[pageNumber].PageInfo.Margin.Bottom + pdfDocument.Pages[pageNumber].PageInfo.Margin.Top) * 150 / 100),
                    new Resolution(94),
                    70);
                jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);
                imageStream.Close();
            }
        }

The testing file was from our end user and i might need confirm with them before upload it. Just let me know if it’s necessary for investigation.

Thanks

@jiangshanqquiuc.163

Could you please share your input PDF file here for testing? You can upload your file to Dropbox and share the link with us. We will investigate the issue and provide you more information on it.

Thanks for your reply, but I don’t have a Dropbox account. Is there any change that you can share me a location and I can upload the PDF file?

@jiangshanqquiuc.163

You can use some other free file sharer application like WeTransfer or Google Drive to upload the file and share the link with us. Thanks for your cooperation.

@tahir.manzoor, thanks for your help. We uploaded the file to WeTransfer and you can check with the URL https://we.tl/t-VmhwcEeeXl for the file download. Please let me know if you need any other assistant.

@jiangshanqquiuc.163

We have logged this problem in our issue tracking system as PDFNET- 52384. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Sure, Thanks for your help and just let me know if you have any other information from my side then.

Hi @tahir.manzoor, any updates about this issue?

@jiangshanqquiuc.163

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Hi @tahir.manzoor
Could you guys set high priority and this is critical for us and blocking our current project and we need solution ASAP.

@jiangshanqquiuc.163

@TommyZhou

Unfortunately, there is no update available on your issue. You can also use Facade PdfConverter class to convert PDF pages to images. Please refer to the following article for more detail. Hope this helps you.

Convert PDF File

Hi @tahir.manzoor
Thanks for your quick solution and we did a test with PdfConverter based on DoConvert | Aspose.PDF for .NET API Reference. But unfortunately it also takes more than 5 minutes to finish converting to image. Please keep investigating on this and give us feedback. Thanks again

@TommyZhou

We will inform you via this forum thread once this issue is resolved. Thanks for your patience.

Hi @tahir.manzoor,

Any update here? Thanks again

@TommyZhou

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

We will inform you once there is any news available on your issue. Thanks for your patience.