hi im beginner level programmer
ASPOSE’s API is useful and good working.
my company wants buy this API but some PC makes this error.
what is the problem ?
this issue is too difficult to me… TT
plz help me… thanks
my question is not definite
hope for understanding and ask for more info to me
this is the message :
Aspose.CAD.CadExceptions.ImageSaveException: Image saving failed. —> Aspose.CAD.CadExceptions.ImageSaveException: Image export failed. —> System.ArgumentException: illegal characters in path
and this is my path when i debugging :
C:\Users\ParkTaegeom\Documents\Aspose.CAD-for-.NET-master\Aspose.CAD-for-.NET-master\Examples\Data\DWG-Drawings\Bottom_plate_out.pdf
this is my code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.CAD;
namespace Aspose.CAD.Examples.CSharp.DWG_Drawings
{
public class ExportToPDF
{
public static void Run()
{
//ExStart:ExportToPDF
// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_DWGDrawings();
string sourceFilePath = MyDir + “Bottom_plate.dwg”;
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
{
// Create an instance of CadRasterizationOptions and set its various properties
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
rasterizationOptions.BackgroundColor = Aspose.CAD.Color.White;
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
// Create an instance of PdfOptions
Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
MyDir = MyDir + "Bottom_plate_out.pdf";
// Export the DWG to PDF
image.Save(MyDir, pdfOptions);
}
//ExEnd:ExportToPDF
Console.WriteLine("\nThe DWG file exported successfully to PDF.\nFile saved at " + MyDir);
}
}
}