Free Support Forum - aspose.com

BmpDevice.Process method hangs forever

Hi.

I am trying to save PDF page to a stream and in some cases (some PDF files) it hangs forever. No exception is thorwn, the method just hangs and the code stops executing forward.

I am using Aspose.PDF 17.5. version with latest Visual Studio. Also, I have to note that we use two projects, one is CMD tool which works fine, but the other Azure Function v1 does not work for that file. The affected PDF file has 130 pages and is 6MB in size. It opens in Adobe acrobat Fine and the details of the file are here:

PDF Producer: Adobe PSL 1.3e for Canon
PDF Version: 1.5 (Acrobat 5.x)

I dont think this matters, because it works fine within CMD tool. I’ve tried with latest 18.8 library and it’s the same issue. Otherwise any suggestions?

EDIT: It also fails on PDF.Repair() call. For some reason this PDF is not compatible within Azure Function project.

EDIT2: I’ve tried smaller page sizes of PDFs and it looks like if a PDF has below 60 pages works fine. That is strange… I’ve split original PDF (with CMD tool) so I assume that the problem is page number.

EDIT3: I’ve tried to split PDF with Aspose.Pdf prior to processing and it still hangs forever.

Thanks, Miha

@baterija

Thanks for contacting support.

Would you please share your sample PDF document along with sample code snippet. So that we can test the scenario in our environment and address it accordingly.

I found a solution to my problem. Have to change Stream to byte[] as an input file to my Azure function.

Hope it helps someone.

@baterija

Its nice to know that your issue has been resolved. Your suggestions will definitely help other facing similar issue. Please keep using our API and in case of any further assistance, please feel free to let us know.