The “Automation Direct” logo is missing from the title block when converting DWG to PDF. Same issue with converting to PNG and other image formats. Link to DWG:
https://ftp.automationdirect.com/support/drawings/2d/CPS9T-AP-A.zip
Here is my current code:
public static bool ExportToPDF(string filepath)
{
//ExStart:ExportDXFToPDF
// The path to the documents directory.
string outputFilePath = Path.ChangeExtension(filepath, ".pdf");
using (var image = (CadImage)Image.Load(filepath))
{
// Create an instance of CadRasterizationOptions and set its various properties
var rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
rasterizationOptions.NoScaling = true;
rasterizationOptions.AutomaticLayoutsScaling = false;
rasterizationOptions.DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor;
// Create an instance of PdfOptions
var pdfOptions = new PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
//Export the DXF to PDF
image.Save(outputFilePath, pdfOptions);
}
//ExEnd:ExportDXFToPDF
Console.WriteLine("The DWG drawing exported successfully to PDF.");
return true;
}