Free Support Forum - aspose.com

DWG to PDF missing some content vs TrueView-generated PDF

Hi,

Saving a DWG file to PDF using Aspose.CAD for .NET 20.8 is excluding some content when compared to the PDF generated by the AutoDesk TrueView program.

Code (from https://docs.aspose.com/cad/net/converting-cad-drawings-to-pdf-and-raster-image-formats/)

using (Aspose.CAD.Image image = Aspose.CAD.Image.Load("c:\\test\\input.dwg"))
{
    // Create an instance of CadRasterizationOptions and set its various properties
    Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
    rasterizationOptions.PageWidth = 1600;
    rasterizationOptions.PageHeight = 1600;
    rasterizationOptions.BackgroundColor = Aspose.CAD.Color.Beige;
    rasterizationOptions.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseDrawColor;
    rasterizationOptions.DrawColor = Aspose.CAD.Color.Blue;

    // Create an instance of PdfOptions
    Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
    // Set the VectorRasterizationOptions property
    pdfOptions.VectorRasterizationOptions = rasterizationOptions;

    //Export CAD to PDF
    image.Save("c:\\test\\aspose_output.pdf", pdfOptions);
}

Also, the Aspose output PDF includes a blank page at the start.

Here is zip file containing the input.dwg, aspose_output.pdf and trueview_output.pdf: files.zip (535.6 KB)

Is it possible for Aspose.CAD to generate a PDF closer to the TrueView-generated PDF?

Thank you

@ast3

It seems to be an issue with API. A ticket with ID CADNET-1207 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.