DWG to PDF/A and PDF/E format

Hello Everyone!


I need some help here, I need to convert a DWG file to PDF/A and PDF/E, how can I do that? It is possible???

I trying to use an example from GitHub:
https://github.com/aspose-cad/Aspose.CAD-for-.NET/tree/master/Examples

But, I having erros in “ScaleMethod”:


foreach (var style in cadImage.Styles.ValuesTyped)
{
// Set the font name
style.PrimaryFontName = “Arial”;
}

and

using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(sourceFilePath))
{
// Specify the font for one particular style
cadImage.Styles[“Arial”].PrimaryFontName = “Arial”;
}

*** Whats is in bold is showing erros ***


But, if You have any idea about this, please, help me, We are fully interested in acquiring this API as soon as possible.


Hi,

Thank you for your inquiry.

This is to update you that the feature you are looking for is not available. A feature request has been logged into our system with ID CADNET-281. Our product team will further analysis the requirement and provide feedback. We will update you with the feedback via this forum thread.

Furthermore we need sample project along with input file. This will help us to reproduce the issue at our end. Please share a sample project of yours along with input file.

Hi, I have the same need…

Me too, I tried your example with same errors as ralmeida96

The sample project is Aspose.CAD.Examples.VisualBasic provided by ASPOSE… and downloadable from github…

:slight_smile:

Thanks for the answer!


Attached follows the test project I am having problems and a dwg file that is zipped by site constraints.

Thank You again!
Hi,

Thank you for sharing samples.

This is to update you that we have investigated the issue. Some APIs have been removed and some have been added into the latest version of Aspose.CAD. Please use the following code snippets to get it working.

We are sorry for the inconvenience caused.

CODE:
private void Substituting_Fonts_1()
{
string MyDir = RunExamples.GetDataDir_ConvertingCAD();
string sourceFilePath = MyDir + "conic_pyramid.dxf";
// Load a CAD drawing in an instance of CadImage
using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(sourceFilePath))
{
// Iterate over the items of CadStyleTableObject
foreach (Aspose.CAD.FileFormats.Cad.CadTables.CadStyleTableObject style in cadImage.Styles)
{
// Set the font name
style.PrimaryFontName = "Arial";
}
}
}
private void Substituting_Fonts_2()
{
string MyDir = RunExamples.GetDataDir_ConvertingCAD();
string sourceFilePath = MyDir + "conic_pyramid.dxf";
// Load a CAD drawing in an instance of CadImage
using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(sourceFilePath))
{
// Iterate over the items of CadStyleTableObject
foreach (Aspose.CAD.FileFormats.Cad.CadTables.CadStyleTableObject style in cadImage.Styles)
{
// Specify the font for one particular style
if (style.StyleName == "Roman")
style.PrimaryFontName = "Arial";
}
}
}

The issues you have found earlier (filed as CADNET-281) have been fixed in Aspose.CAD for .NET 17.12. Please try using the latest release version and in case you experience any issue or you have any further query, please feel free to contact.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.