Hi!
I started evaluation of Aspose.CAD today, but I see, that it cannot process several DWG files from my collection correctly. My code snippet is below. Source DWG files I cannot convert are available to download from:
http://download.print-driver.com/ex/mb/aspose/acad.rar
Please let me know if you could fix this issue.
Mikhael
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Const sSrcDir = “D:\fGI Proekts – Mike version\test files kit\acad”
Const sOutDir = “D:\out\cad”
Dim lst = GetListOfFiles(Path.Combine(sSrcDir, "*.dwg"), True)
for each item in lst
Try
Using img = Aspose.CAD.Image.Load(item)
Dim rasterizationOptions = New Aspose.CAD.ImageOptions.CadRasterizationOptions()
rasterizationOptions.PageSize = New Aspose.CAD.SizeF(img.Width, img.Height)
Dim opts = New Aspose.CAD.ImageOptions.PdfOptions()
opts.VectorRasterizationOptions = rasterizationOptions
Dim sOutFile = Path.Combine(sOutDir, GetFileName(item) + ".pdf")
img.Save(sOutFile, opts)
End Using
Catch ex As Exception
Console.WriteLine(item + " - FAILED")
End Try
Next
End Sub