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.

Sun Feb 09, 2020 9:41 pm

Hi,

I am using FreeSpire.PDF to load PDF document using new PdfDocument().LoadFromFile(filename);
Then I call SaveAsImage(0, 300, 300) to create Image object.
It all used to work fine until recently when I found that the returned Image object differs if the program is run with the Debugger or without.

When I run the application using F5 I get Image object that is 6000x8587.
Same file, same code - just rerun this time with Ctrl+F5 and I get Image object that is 2400x3437.

The same code works on another machine with F5 and with Ctrl+F5 and returns the correct object size of 2400x3437.

Any idea what could be reason that under debugger the image object is 2.5 times larger?

Can it be related to any High DPI settings?

Thank you,
Martin

kulov
 
Posts: 2
Joined: Mon Jul 09, 2018 10:49 pm

Mon Feb 10, 2020 2:41 am

Hello,

Thanks for your inquiry.
I simulated your case with the latest Free Spire.PDF for .NET Version:5.10 but did not reproduce your issue. To help us further investigate your issue, please provide the following information.
1) Your full testing code as well as your input file.
2) The information of the testing environment that you encountered the issue, such as OS information (E.g. Windows 7, 64bit) and Region setting (E.g. China, Chinese).

You could attach the information here or send them to us via email ([email protected]). Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
Last edited by rachel.lei on Thu Feb 13, 2020 8:34 am, edited 1 time in total.
User avatar

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

Mon Feb 10, 2020 2:45 pm

Hi Team,

we are getting the stack overflow exception on the saveasImage method, when we try to extract the image of the PDF.

Thanks,
Ram

sramdass
 
Posts: 1
Joined: Tue Oct 22, 2019 11:06 am

Tue Feb 11, 2020 2:18 am

Hi Ram,

Thanks for your post.
Did you also send us an email with the subject "Hi team Stack over flow exception"? I tested the file "Report.pdf" and indeed got the stack overflow exception. This issue has been logged into our bug tracking system with the ticket SPIREPDF-3037. We will let you know if there is any update. Sorry for the inconvenience caused.

If the email is not sent by you, please provide your input file for further investigation.

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Wed Feb 12, 2020 9:04 pm

Dear Rachel,

It seems that the issues is replicated with any pdf on my machine.
I am using Microsoft Surface laptop with Windows 10 with 250% font increase.

Please see attached wikipedia.pdf to replicate the issue using FreeSpire.PDF 5.10.0 NuGet package.
Attached are also output png files as a result of SaveAsImage(0, 300, 300) for both with and without debugger.
I have made screenshot of my Windows font scaling settings which correspond to the 2.5 times increase of dimensions between two output image files.
Thank you,
Martin

kulov
 
Posts: 2
Joined: Mon Jul 09, 2018 10:49 pm

Thu Feb 13, 2020 8:36 am

Hi Martin,

Thanks for your sharing.
Sorry to tell that I tested your case on several computers but still didn't reproduce your issue. To help us look into your issue better, please provide your Region setting information (E.g. China, Chinese) and a runnable project that could reproduce your issue. You could send it to us via email ([email protected]). Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Wed Aug 04, 2021 11:09 am

sramdass wrote:Hi Team,

we are getting the stack overflow exception on the saveasImage method, when we try to extract the image of the PDF.

Thanks,
Ram


Hi Ram,

Sorry for the long silence.

Glad to inform you that we just released Spire.PDF Pack(Hot Fix) Version:7.8.2 that fixes the issue SPIREPDF-3037. Welcome to download it from the following links.
Our website: https://www.e-iceblue.com/Download/down ... t-now.html
NuGet: https://www.nuget.org/packages/Spire.PDF/7.8.2

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Return to Spire.PDF

cron