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.

Tue Mar 08, 2022 1:49 pm

Hi,

I have successfully converting many PDF documents to Images but am receivng the following error when trying to conver the attacged PDF.
Length cannot be less than zero. Parameter name: length

PdfDocument doc = new PdfDocument();
doc.LoadFromStream(pdfStream);
System.Drawing.Image imgPage = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Bitmap); * Error occurs on this line

I am unable to see any issues in the PDF, any assistance will be appreciated!

mturner1234
 
Posts: 1
Joined: Tue Mar 08, 2022 1:37 pm

Wed Mar 09, 2022 2:22 am

Hello,

Thanks for your inquiry!

I have reproduced your issue and logged it in our issue tracking system with the ticket SPIREPDF-4984 for further investigation.

We will let you know if there is any update. Sorry for the inconvenience caused.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Apr 21, 2022 9:59 am

Hello,

Thank you for your patience.
Glad to inform you that we just released Spire.PDF Pack(Hot Fix) Version:8.4.15 which fixes the issue SPIREPDF-4984, welcome to test it.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link:https://www.nuget.org/packages/Spire.PDF/8.4.15

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.PDF