Free Support Forum - aspose.com

DWG to PDF behaviour

Hi there,

We are using Aspose.CAD 23.0 for .NET and the following code to convert to PDF the input.dwg file to output.dwg.pdf. I attached all the resources here: DWG to PDF.zip (412.1 KB)

        using (var image = Image.Load(input))
        {
            var cadPageSizes = CadPageSizesForA4(image.UnitType);
            var rasterizationOptions = new CadRasterizationOptions
            {
                PageWidth = cadPageSizes.PageWidth,
                PageHeight = cadPageSizes.PageHeight,
                UnitType = cadPageSizes.UnitType,
                DrawType = CadDrawTypeMode.UseObjectColor
            };
            image.Save(output, new PdfOptions
            {
                VectorRasterizationOptions = rasterizationOptions
            });
        }

Please check the PNGs with how the input is rendered in Autodesk’s Trueviewer and the output.dwg.pdf file that we get using the aforementioned code:

  1. Page 2 is not grayscale
  2. Pages 5-7 no longer have opacity

Can you please assist in debugging this? Maybe the DrawType is messing with this conversion?

Best regards.

@gwert,

I have observed the issue shared by you and a ticket with ID CADNET-1056 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 notified once the issue will be fixed.