We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to convert DWG files to PDF


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:

Please let me know if you could fix this issue.


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
            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

End Sub


I have observed your comments. Can you please share complete working sample project so that we may further investigate to help you out.

Here is the project:

Please keep me updated about your research results.


I have worked with the DWF file shared and have been able to observe the issue. An issue with ID CADNET-641 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.