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.

Thu Nov 02, 2023 4:05 pm

Hello,

I'm testing Spire.PDF with a temporary license.
I use .Net 4.8 Framework.
I created a console application with this very simple code:

Code: Select all
string src="c:\temp\input.pdf" ;
string dest = "c:\temp\output.pdf" ;
PdfStandardsConverter converter = new PdfStandardsConverter(src);
converter.ToPdfA1A(dest);


The application works in DEBUG mode but not in RELEASE mode.

In release mode, converter.ToPdfA1A(dest) cause the exception "Unable to access a closed Stream";

Finally, I understood that it was due to the "optimize code" option, in "Build" project properties.

When the option is checked I get the exception.
Can't we use this option?

Thank you for any help you can give me.

Greetings
Gabriel

gabriel.b
 
Posts: 1
Joined: Tue Oct 24, 2023 10:36 am

Fri Nov 03, 2023 9:45 am

Hi ,

Thanks for your inquiry.
Does this issue occur when running in release mode without applying the license? In addition, in order to help us accurately investigate your issue, please provide the following information to assist us in further investigation.Thank you in advance.
1)Your entire console application, due to your entire console application are very big, you could upload this to the DropBox or OneDrive and then share the download link with us.
2)Your input test file, you can attach here or send it to us via email ([email protected] ).
3)The OS information, e.g. Win7 64bit
4)The version of VS, such as VS2022

Sincerely,
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Return to Spire.PDF

cron