Aspose CAD slow first time

Aspose Cad run at first time is very slow exporting the PDF from a DXF File. After that is OK is fast until I restart the application.
I saw some fix in Aspose.Writer is there anything on Aspose.CAD
running version
.developing using on .net 4.6.2 C#

it stays long time here >> cadimage.Save(outputPDF, pdfOptions);
code I am using

the only thing different is an output error for first document
Exception thrown: ‘System.NullReferenceException’ in itextsharp.dll (5.5.13) error appear once
on any other version I have multiple itextsharp.dll errors (as mentioned) on each conversion.

 using (FileStream cad = new FileStream(sourceFilePath, FileMode.Open, FileAccess.Read, FileShare.Read))

		using (Aspose.CAD.Image cadimage = Aspose.CAD.Image.Load(cad))
			// Create an instance of CadRasterizationOptions and set its various properties
			Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();

			int x = cadimage.Width;
			int y = cadimage.Height;

			rasterizationOptions.PageWidth = 17;
			rasterizationOptions.PageHeight = 11;
			rasterizationOptions.AutomaticLayoutsScaling = true;
			rasterizationOptions.NoScaling = false; // changed
			rasterizationOptions.UnitType = UnitType.Inch;

			// 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
			string outputPDF = Path.Combine(Path.GetDirectoryName(sourceFilePath), Path.GetFileNameWithoutExtension(sourceFilePath) + @".pdf");
			cadimage.Save(outputPDF, pdfOptions);

@meptec ,
We will check this case, could you please attach the test file you observe the situation with?

For any dxf file case. does not matter the content or type of dxf.
As I mentioned it stays long time here >> cadimage.Save(outputPDF, pdfOptions);
Then for next call :
for same dfxf file or any other dxf file goes quickly.

Uploaded the video in which I show the time difference in out application.
Same thing happen if only using a bare metal implementation.
2023-10-19 (2.7 MB)

1 Like

Thank you for the such nice visualization! We will work on the fix for this in the scope of the issue below.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CADNET-9440

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.