Hello.
I found an issue of dwg-to-pdf conversion.
Aspose.CAD.CadExceptions.ImageSaveException occurred at Aspose.CAD.Image.Save method.
Detailed error messages are the followings.
I translated some debugger text to English.
Aspose.CAD.CadExceptions.ImageSaveException was unhandled
HResult=-2146233088
Message=Image saving failed.
Source=Aspose.CAD
StackTrace:
Position: Aspose.CAD.Image.SaveInternal(String filePath, ImageOptionsBase options)
Position: Aspose.CAD.Image.Save(String filePath, ImageOptionsBase options)
Position: TestConsole.Module1.TestPDF() File TestConsole\Module1.vb:line 85
Position: TestConsole.Module1.Main() File TestConsole\Module1.vb:line 14
Position: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
Position: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
Position: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
Position: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
Position: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
Position: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Position: System.Threading.ThreadHelper.ThreadStart()
InnerException: Aspose.CAD.CadExceptions.ImageSaveException
HResult=-2146233088
Message=Image export failed. Error during PDF export: Index is out of range. The index must not be negative and must be smaller than the size of the collection.
Parameter name: index
Source=Aspose.CAD
StackTrace:
Position: Aspose.CAD.Image.SaveInternal(Stream stream, ImageOptionsBase optionsBase)
Position: Aspose.CAD.Image.SaveInternal(String filePath, ImageOptionsBase options)
InnerException:
HResult=-2146233088
Message=Error during PDF export: Index is out of range. The index must not be negative and must be smaller than the size of the collection.
Parameter name: index
Source=Aspose.CAD
StackTrace:
Position: .Export(Image , Stream , ImageOptionsBase , Rectangle )
Position: Aspose.CAD.Image. . ()
Position: . ( , Int32 , )
Position: Aspose.CAD.Image.SaveInternal(Stream stream, ImageOptionsBase optionsBase)
InnerException: System.ArgumentOutOfRangeException
HResult=-2146233086
Message=Index is out of range. The index must not be negative and must be smaller than the size of the collection.
Parameter name: index
ParamName=index
Source=mscorlib
StackTrace:
Position: System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
Position: System.Collections.Generic.List`1.get_Item(Int32 index)
Position: . (Image , VectorRasterizationOptions , Int32 )
Position: . (CadRasterizationOptions )
Position: .Export(Image , Stream , ImageOptionsBase , Rectangle )
InnerException:
I attached dwg files which make error.
dwg.zip (1.3 MB)
Best regards.