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 DWG DXF to PDF C# | Convert Auto CAD Files to PDF JPEG PNG in C# .NET|Documentation)
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