Free Support Forum - aspose.com

The way without using Automatic reduction

Currently, we’re creating PNG images from DWF images by using this sample source.
However, it’s automatically reduced.
Our purpose is to output images without automatically reduction, but the images is out of print area and not displayed.
We want sample source for setting the drawing position without automatic reduction.

rasterizationOptions.NoScaling = True
rasterizationOptions.AutomaticLayoutsScaling = False

Private Sub convertPNG(ByVal dwfFilePath As String, ByVal pngFilePath As String)

Using image As Aspose.CAD.Image = Aspose.CAD.Image.Load(dwfFilePath)

    Dim rasterizationOptions = New Aspose.CAD.ImageOptions.CadRasterizationOptions()
    rasterizationOptions.PageSize = New SizeF(image.Size.Width * 8 + 16, image.Size.Height * 8 + 16)
    rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor
    rasterizationOptions.NoScaling = True
    rasterizationOptions.AutomaticLayoutsScaling = False
    rasterizationOptions.BackgroundColor = Aspose.CAD.Color.Transparent
    rasterizationOptions.EmbedBackground = False
    rasterizationOptions.Zoom = 1

    Dim margins = New Margins()
    margins.Right = 1
    rasterizationOptions.Margins = margins

    rasterizationOptions.GraphicsOptions.SmoothingMode = Aspose.CAD.SmoothingMode.HighQuality
    rasterizationOptions.GraphicsOptions.TextRenderingHint = Aspose.CAD.TextRenderingHint.AntiAliasGridFit
    rasterizationOptions.GraphicsOptions.InterpolationMode = Aspose.CAD.InterpolationMode.HighQualityBicubic

    Dim iob = New Aspose.CAD.ImageOptions.PngOptions()
    iob.VectorRasterizationOptions = rasterizationOptions
    iob.ColorType = Aspose.CAD.FileFormats.Png.PngColorType.TruecolorWithAlpha

    image.Save(pngFilePath, iob)

End Using

End Sub

@YamaTomo

Can you please explain what is reduced by sharing specifically an example along with generated output. Please also provide the comparison image showing difference between source and generated output. I also suggest you to please try using latest Apsose.CAD for .NET 20.10 as well on your end.