at System.Runtime.TypeCast.CheckCastClass(MethodTable*, Object) + 0x31
at SkiaSharp.SKAbstractManagedStream.ReadInternal(IntPtr s, Void* context, Void* buffer, IntPtr size) + 0xc4
at Spire.Presentation.Base!<BaseAddress>+0x126c20c
[2024-09-19 12:45:16,107] CRITICAL in app: Server stopped or crashed
[2024-09-19 12:45:16,107] CRITICAL in app: Server stopped or crashed
Hi, I'm getting error for the below code in python, I'm trying to convert a docx file into PDF, I've checked if the docx file is valid or not, the file is getting passed as valid and the data type is also correct. I'm not getting this error everytime, this error comes randomly irrespective of the input docx.
- Code: Select all
from spire.doc import *
from spire.doc.common import *
document = Document()
document.LoadFromFile("C:\\Users\\Administrator\\Desktop\\input.docx")
document.SaveToFile("output/ToPDF.pdf", FileFormat.PDF)
document.Close()
I'm using the same sample code but with extra exception handlings, but I'm not able to catch this particular error whatever I do, and most importantly this error causes the server to crash everytime.