Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jul 01, 2020 6:47 am

Hi,

We have just upgraded to v6.5 and got an issue with loading an byte array into and PDF document: it kept running forever inside this method.

pdfDocument.LoadFromBytes(binaryData);

Is there a way to check error log or set timeout for this method?

FYI, the byte array is unzipped one (using SharpZipLib). If I used original array (without unzipping it), it will throw error on the LoadFromBytes method above:
Spire.Pdf.Exceptions.PdfDocumentException: 'Invalid/Unknown/Unsupported format'

Thanks,

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Wed Jul 01, 2020 10:35 am

Hello,

Thanks for your inquiry.
Kindly note that our Spire.PDF is commonly used to operate the PDF file, if you use it to load the data whose format can't be loaded by our product, you will get the error "Invalid/Unknown/Unsupported format". I suggest you use below code to write the bytes to a PDF file, if the generated PDF file has errors or can't be opened normally, I'm afraid that your issue is related to your bytes itself but not our product.
Code: Select all
File.WriteAllBytes(PdfFile, binaryData);

If there is no problem with the generated PDF, please provide your bytes data to help us further investigate your issue.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Jul 02, 2020 6:12 am

Hi,

Thank you for the response.

File.WriteAllBytes(PdfFile, binaryData);

I used this method and can write pdf successfully. So the problem is most likely in Spire PDF code. Unfortunately, I cannot post the data to you b/c of privacy policy.

1. Is there a way that I can extract the PDF file properties to you, so that you can try to reproduce? It was a pdf from scanned paper document.

2. Can we have a patch to throw timeout exception after some predefined seconds? As for now, I suspected there's a loop inside as these 3 methods all stuck forever:
- LoadFromBytes
- LoadFromStream
- var pdfToAppend = new PdfDocument(binaryData);

Thanks,

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Thu Jul 02, 2020 8:01 am

Hello,

Thanks for your feedback. The following are my answers to your questions.
1. You can send it to us(support@e-iceblue.com) via email. And we promise to keep your document confidential and will not use it for any other purpose.
2. Considering that loading some large documents may take a long time, currently there is no timeout setting for the loading method. I suggest you can set a time limit for the loading process yourself. If the loading process is not completed after the set time, then terminate the process.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Jul 07, 2020 2:38 am

Hi,

I got the permission to send the erroneous pdf file to you.

Can you please confirm you will delete this file after debugging done and send back an deletion confirmation (or post on this thread) back to me?

Thanks,

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Tue Jul 07, 2020 3:22 am

Hello,

Thanks for your reply.
You could send your file directly to me (Rachel.Lei@e-iceblue.com) via email. When we finally test and confirm that your issue is resolved, we will delete your file completely. We promise to keep your document confidential and will not use it for any other purpose.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Jul 07, 2020 3:51 am

Thanks. I've just sent the email to you with steps to reproduce the bug too.

Good luck ;)

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Tue Jul 07, 2020 8:12 am

Hello,

Thanks for your sharing via email.
I have reproduced your issue and logged it in our bug tracking system with the ticket SPIREPDF-3393. Our Dev team will investigate further and fix it. If there is any update, we will let you know.
Apologize for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 08, 2020 4:00 am

Awesome. Can you please let me know once the issue was patched?

Thanks,

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Wed Jul 08, 2020 5:40 am

Hello,

Ok, once your issue is fixed, we will let you know ASAP. If you have further questions, please feel free to write back.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Jul 09, 2020 2:20 pm

I have this same issue in the latest version available from Nuget. For now I am reading from a file that I have saved but this is not a workable solution for me going forward as I can't guarantee file write access on the client. Loading from a stream gives the same "Unknown Format" error.
Frank

franknwtc
 
Posts: 3
Joined: Thu Jul 09, 2020 11:51 am

Fri Jul 10, 2020 5:39 am

Hi Frank,

Thanks for your post.
Please provide us with your input file, then we will confirm whether the issue exists or not. You could attach it here or send it to us(support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 15, 2020 11:09 am

niceboomer wrote:Awesome. Can you please let me know once the issue was patched?

Thanks,

Hi niceboomer,

Hope you are doing well.
I just got news from our Dev team that the issue of SPIREPDF-3393 has been resolved. The fix will be included in the next version of Spire.PDF. Once the new version is available, we will inform you immediately.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 15, 2020 2:27 pm

Thanks a lot guys. Great work on both dev and support ;)

niceboomer
 
Posts: 7
Joined: Wed Jul 01, 2020 6:24 am

Thu Jul 16, 2020 1:52 am

Hi niceboomer,

You are welcome.
We will inform you as soon as the new version of Spire.PDF is released. Have a nice day!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF