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 Dec 20, 2017 5:30 pm

Hi,

I just evaluated your library loading a simple XPS to convert it into PDF.

Code: Select all
               PdfDocument doc = new PdfDocument();
                doc.LoadFromFile(sourceXps, FileFormat.XPS);
                doc.SaveToFile(targetFile, FileFormat.PDF);


System crashes with System.ArgumentOutOfRangeException' in Spire.Pdf.dll

Code: Select all
   bei Spire.Pdf.Graphics.PdfBlendBase.Gcd(Single u, Single v)
   bei Spire.Pdf.Graphics.PdfBlendBase.Gcd(Single[] values)
   bei Spire.Pdf.Graphics.PdfColorBlend.ᜂ(PdfColorSpace A_0)
   bei Spire.Pdf.Graphics.PdfLinearGradientBrush.ResetFunction()
   bei Spire.Pdf.Graphics.PdfLinearGradientBrush.set_InterpolationColors(PdfColorBlend value)
   bei sprḔ.ᜀ(LinearGradientBrush A_0)
   bei sprḔ.ᜀ(Path A_0)
   bei sprḔ.ᜀ(Canvas A_0)
   bei sprḔ.ᜀ(Canvas A_0)
   bei sprẕ.ᜀ(Canvas A_0)
   bei sprẕ.ᜀ()
   bei sprẕ.ᜁ()
   bei sprᦆ.ᜀ(String A_0)
   bei Spire.Pdf.PdfDocument.LoadFromXPS(String fileName)
   bei Spire.Pdf.PdfDocument.LoadFromFile(String fileName, FileFormat fileFormat)
   bei ConvertXPS2PDF.Program.ConvertToSpirePDF(String sourceXps, String targetFile)


As this StackTrace is in German I switched my system to English to make it more readable for you. Suddenly it worked. Inserting

Code: Select all
                System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB");


before loading the XPS fixes the problem but that cannot be a solution outside a test-project. Any advice? I attached the document in question.

ChG.Becker
 
Posts: 2
Joined: Wed Dec 20, 2017 1:51 pm

Thu Dec 21, 2017 7:04 am

Hello,

Thanks for your feedback. After an initial test with the latest version(Spire.PDF Pack(Hot Fix) Version:3.9.538), I was unable to reproduce the issue, please use the version and try again.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Thu Dec 21, 2017 7:31 am

Thanks. It works with the hotfix release.

ChG.Becker
 
Posts: 2
Joined: Wed Dec 20, 2017 1:51 pm

Thu Dec 21, 2017 7:50 am

Hello,

Thanks for your prompt feedback. If you encounter other questions, welcome to contact us.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.PDF

cron