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.

Fri Aug 24, 2018 2:21 pm

I am using Spire.Office version 2.14.

I am attempting to save an 8 Page PDF document to TIFs for each page. Pages 1 - 7 are converted and saved without incident but Page 8 throws the "Parameter is not valid" error. Here is the stack trace:

at System.Drawing.Graphics.ScaleTransform(Single sx, Single sy, MatrixOrder order)
at System.Drawing.Graphics.ScaleTransform(Single sx, Single sy)
at spr7037.0(spr4939 A_0, spr4939 A_1, RectangleF A_2, Int32 A_3, String A_4)
at spr7037.0(spr4939 A_0, RectangleF A_1, String A_2)
at spr7037.0(spr4672 A_0, Boolean A_1)
at spr7037.7(Boolean A_0)
at spr7037.45()
at Spire.Pdf.PdfDocumentBase.0(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Pdf.PdfDocument.SaveAsImage(Int32 pageIndex, Int32 dpiX, Int32 dpiY)
at FSOMPolicyPage_PdfToTiffConversion.Program.Main(String[] args)

I can supply the code that I have running but I can not supply the document as it contains Personal Financial Information (PFI).

Would someone have a idea as to what parameter could be a problem? Safe to say the error is in the 8th page but what might I look at that would cause the stated error message?

Regards,
Carlos Nazario

CNazario
 
Posts: 2
Joined: Thu Aug 23, 2018 11:01 am

Mon Aug 27, 2018 3:29 am

Hello Carlos,

Thanks for your post and sorry for the late reply as weekend.
I prefer to recommend you to download our latest version Spire.Office Platinum (DLL Only) Version:3.8.0 to try again. If the issue still occurs, I'm afraid it is hard to provide an accurate solution without your document and testing code, please send them to us via email ([email protected]), you could remove the confidential data of your document, just make sure the modified file can reproduce your issue. And don't worry, we promise to keep your resources confidential and won't use them for other purpose.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Wed Aug 29, 2018 10:00 am

Hello Carlos,

Greetings from E-iceblue.
Has the latest version resolved your issue? We will appreciated that if you could give some feedback. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Thu Aug 30, 2018 10:45 am

Hi Lisa!!!

I just finished testing it yesterday and it did solve the issue!

We are in the process of upgrading our copy to this latest version.

Thank you for your help!!

Regards,
Carlos

CNazario
 
Posts: 2
Joined: Thu Aug 23, 2018 11:01 am

Fri Aug 31, 2018 1:06 am

Dear Carlos,

Thanks for your valuable feedback. Just feel free to contact us if you need further assistance.
Wish you all the best!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Tue Apr 13, 2021 3:48 pm

Hello,
I am using Spire.PDF 3.8.0.5040. I get the same error for large documents. It works fine for small documents.
I appreciate any help.
Thanks,

Here is a code:
public static Image[] SaveAsImage(PdfDocument document)
{
Image[] images = new Image[document.Pages.Count];
for (int i = 0; i < document.Pages.Count; i++)
{
images[i] = document.SaveAsImage(i);
}
return images;
}

jaconsuegra
 
Posts: 4
Joined: Tue Apr 13, 2021 3:38 pm

Wed Apr 14, 2021 8:26 am

Hello,

Thank you for your inquiry.
The Spire.PDF 3.8.0 you used is an old version, now the latest version is Spire.PDF Pack(Hot Fix) Version:7.4.5 . Please give the latest one a try. If the issue still happens, please provide your PDF documents and your testing environment such as OS information (e.g. Windows7, 64bit) and your region setting (e.g. China, Chinese) to help us further investigate your issue. You could attach them here or email to us at [email protected]. Thank you in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Apr 14, 2021 3:40 pm

Thanks Annika,
I try the new version but I am still getting the same error. I emailed you a pdf file you can use to duplicate the error.

Thanks,
Alexis

jaconsuegra
 
Posts: 4
Joined: Tue Apr 13, 2021 3:38 pm

Thu Apr 15, 2021 5:45 am

Hello,

Thank you for your sharing.
I tested your Pdf document, but didn't encounter the exception "Parameter is not valid". I uploaded my executable exe, please click the ToImage781.exe to check if the issue still occurs on your side. Besides, please provide the following information so that we can further investigate your issue at my end. I am looking forward to your reply.
1) Your project type such as Console App (.NET Framework 4.6.2).
2) System environment such as Windows 7.

Application link: http://www.e-iceblue.com/downloads/demo/myTest.zip

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Thu Apr 15, 2021 12:54 pm

Thanks Annika,
Your executable worked with no errors but the images created do not show the real pages in the pdf.
Our project type is a MVC Website (.NET Framework 4.7.2)
I tried two systems: Windows 10 and Windows Server 2012 R2 Standard x64
Some hints.
The error happens on both system mentioned above.
All images are processed in memory.
The error is thrown at page 432 with this sample pdf file.

jaconsuegra
 
Posts: 4
Joined: Tue Apr 13, 2021 3:38 pm

Fri Apr 16, 2021 11:12 am

Hello,

Thank you for your feedback.
We have checked our records and found that your license subscription was expired in 2018, thus the warning message will appear when you use our latest version. And my previous .exe demo didn't apply the valid license and it only can convert out 10 pages. To help you better test our latest version, our sale team just sent a temporary license(one month free) to your email.
Meanwhile, I created a MVC Web application and tested in the same environments as your. But I still didn't reproduce your issue. Here, I uploaded my testing demo which I put my output images in "mytestImage" folder. You can check and test it. If only your application has the issue, please share your runnable application for a further investigation.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Apr 21, 2021 6:28 pm

Hi,
We purchased the new license. Thanks. But I am still getting the error with the new dlls. I tried your sample application and it saves each page as an image, but we want to process the images in memory. Our goal is to convert the pdf document to a multi pages tiff file. It is working fine for small documents but we get the error for large documents.
Thanks,
Alexis

jaconsuegra
 
Posts: 4
Joined: Tue Apr 13, 2021 3:38 pm

Thu Apr 22, 2021 8:14 am

Hi,

Thank you for your feedback.
I also converted your previous PDF file ("837i 5010 companion guide_v1.0_Indiana.pdf") to TIFF in Windows10 and WinServer2012 systems, but I still didn't reproduce your issue. I uploaded my updated testing program, you can run it on your side and then let us know your testing result. If your issue only exists in your program, to help reproduce your issue and better investigate it, please share us with your runnable application for reference.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Sun Apr 25, 2021 9:45 am

Hello,

Greetings from e-iceblue.
How is your issue going? Can you give us some feedback at your convenience? Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF