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);
}
}
I have observed the issue shared by you and request you to please share the source DWG file reproducing the issue on your end. I also request you to please first try using Aspose.CAD for .NET 17.4 as well on your end before sharing further information with us.
In that case, I request you to please upload the source file on some FTP server or Dropbox and sharing the download link with us. We will be able to investigate the issue further on our end on provision of requested information.
Thank you for sharing the requested project. I have worked using Aspose.CAD for .NET 17.4 on my end and have successfully generated PDF without any issue. For your kind reference, I have attached the generated PDF as well. Can you please share if this is the same DWG file with which you are having exception on your end.
I have observed the further information shared by you and it seems to some configuration related issue. Can you please share the Operating System details along with Visual Studio and .NET Framework information of machine where things are not working. Please also check the locale settings of of machine and compare it with the machine locale settings where things are working. Please perform this investigation on your end and share the findings with us.
I have observed that you are facing issue on computers where you are using .NET Core. I am afraid, at the moment we do not have support for .NET Core in our API.