Hi,
We have a problem converting the PDF file to an image in Thai language and 2 from 10 times the same problem in English.
It’s Urgent !
Error : Parameter is not valid. responseCode=2004
ToImageController 2004-0 Stack Trace: at Boj.DM.WebAPI.FileConverter.Controllers.ToImageController.SaveAsImage(PdfDocument document) in C:\VS\dm.fileconverter\Boj.DM.WebAPI.FileConverter\Controllers\ToImageController.cs:line 211
at Boj.DM.WebAPI.FileConverter.Controllers.ToImageController.ConvertImage(Nullable`1 conversionFormat, String fileBytes) in C:\VS\dm.fileconverter\Boj.DM.WebAPI.FileConverter\Controllers\ToImageController.cs:line 177
at Boj.DM.WebAPI.FileConverter.Controllers.ToImageController.Post(ToImageRequestModel request) in C:\VS\dm.fileconverter\Boj.DM.WebAPI.FileConverter\Controllers\ToImageController.cs:line 40. InnerException:System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.MeasureString(String text, Font font, PointF origin, StringFormat stringFormat)
at spr?.?(Font A_0, String A_1)
at spr?.?(spr? A_0, spr? A_1, Font A_2, Char A_3)
at spr?.?(spr? A_0, spr? A_1, Graphics A_2, PointF A_3)
at spr?.?(Graphics A_0, spr? A_1, Boolean A_2)
at spr?.?(String A_0, spr? A_1, String A_2, Boolean A_3)
at spr?.?(String[] A_0, String A_1)
at spr?.?(spr? A_0)
at spr?.?(Boolean A_0)
at spr?.?(Graphics A_0, spr? A_1, spr? A_2)
at spr?.?(String[] A_0)
at spr?.?(spr? A_0)
at spr?.?(Boolean A_0)
at Spire.Pdf.PdfDocumentBase.?(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Pdf.PdfDocumentBase.?(Int32 A_0, PdfImageType A_1, Int32 A_2, Int32 A_3)
at Boj.DM.WebAPI.FileConverter.Controllers.ToImageController.SaveAsImage(PdfDocument document) in C:\VS\dm.fileconverter\Boj.DM.WebAPI.FileConverter\Controllers\ToImageController.cs:line 202
in dev everything is ok, in production, when we convert many files, we get this error in Converting pdf to Image :
ConverImage(ConversionFormat,FileType) : one of these 2 params in not valid AND responseCode=2004
can someone tell me when we can receive parameter is not valid if i use the same files every time, and most of the time every thing is ok ?
we have spire.pdf version : 4.11.0.2040, and we have upgrade windows from 2008 to 2016.
thanks