Aspose.cad for java issue

1.How to convert the CAD image into HD (vectorgraph)? CAD conversion of the picture is very vague.
2.If CAD is 3D, the code does not set this property (setTypeOfEntities (TypeOfEntities.Entities3D)) export PDF is blank, and so is 2D CAD。How to know whether CAD is 3D or 2D?
3.Maximum file size can be converted?
4.Null pointer to transform PDF,see 2.jpg ,2.dwg
code:
public static void main(String[] args)
{
String dataDir = START + "DWGDrawings\\";
String srcFile = dataDir + "2.dwg";

long now = new Date().getTime();
// Load a CAD drawing in an instance of CadImage
CadImage image = (CadImage) Image.load(srcFile);
// Create an instance of CadRasterizationOptions
CadRasterizationOptions rasterizationOptions = null;
PdfOptions pdfoptions = null;
JpegOptions bmp = null;
int i = 1;
rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.setCenterDrawing(true);
rasterizationOptions.setAutomaticLayoutsScaling(true);
rasterizationOptions.setTypeOfEntities(TypeOfEntities.Entities2D);
// rasterizationOptions.setLayouts(new String[] {string2});
//rasterizationOptions.setTypeOfEntities(TypeOfEntities.Entities3D);
pdfoptions = new PdfOptions();
// Set VectorRasterizationOptions property to the instance of CadRasterizationOptions
pdfoptions.setVectorRasterizationOptions(rasterizationOptions);
// Export each layer to JPEG format
image.save(END + i + "1222331.pdf", pdfoptions);
System.out.println(i);
System.out.println(new Date().getTime() - now);
}

5.CAD conversion PDF and picture conversion content is not the same, PDF lost part of the map and text see 2.dwg(convert 2.dwg to jpg and pdf)

6.When we want to convert the about 70M (file size) CAD to throw the exception . see 1.jpg (The file is too large to upload)

Hi Jiaokun,

Thanks for inquiring Aspose.CAD.

I have observed your requirements and request you to please provide the issue details (preferably in English) separately for each issue along with used sample code for issues. I can see the two images 1.jpg and 2.jpg showing exceptions. Please share the issue details with us so that we may proceed further to help you out.

Many Thanks,

see it again , thanks

Hi,

Thanks for sharing the details with us.

I have observed your comments and will try answering your question separately in following section.

booway:
1.How to convert the CAD image into HD (vectorgraph)? CAD conversion of the picture is very vague.

At present Aspose.CAD supports exporting files to PDF and images. We have an issue added as a new feature request in our issue tracking system with ID CADJAVA-133 to provide support for exporting to SVG which will have better rendering support.

booway:
2.If
CAD is 3D, the code does not set this property (setTypeOfEntities
(TypeOfEntities.Entities3D)) export PDF is blank, and so is 2D CAD。How
to know whether CAD is 3D or 2D?

Actually, at present there is no support for 3D available. You may just iterate over all entities and look, if it is only 3D-desgned or not. For now you can draw 2D or drawing only from 3D-entities for which we have support available, e.g. 3D-faces. This flag was implemented just to make some artificial distinguish between 2D and 3D because mix of them is very complex to implement. So, for now Aspose.CAD only supports 2D drawings from 3D entities. So, I suggest you to please use only following property at the moment.

rasterizationOptions.setTypeOfEntities(TypeOfEntities.Entities2D);

booway:
3.Maximum file size can be converted?
6.When we want to convert the about 70M (file size) CAD to throw the exception . see 1.jpg (The file is too large to upload)


There is no limit of file size theoretically in API but sometime we come across memory exception issues while dealing with big files. You can try increasing the java heap size in your application to verify the big file and if there is still an issue then please share the file with us for further investigation on our side. Moreover, your message, “The file is too large to upload” may probably be encountering in your application if you are trying to upload the file to some web application. You can test the big file in Java application by increasing heap size.

booway:
4.Null pointer to transform PDF,see 2.jpg ,2.dwg

I have been able to reproduce the exception and an issue with ID CADJAVA-131 has been created in our issue tracking system for resolution.

booway:
5.CAD
conversion PDF and picture conversion content is not the same, PDF lost
part of the map and text see 2.dwg(convert 2.dwg to jpg and pdf)


I think you are probably trying to refer1.dwg here as 2.dwg is throwing exception. I have been able to observe the difference in generated PDF and image from 1.dwg file. An issue with ID CADJAVA-132 has been created in our issue tracking system for resolution.

We will be sharing the good news with you as soon as the issues will be fixed.

We are sorry for your inconvenience,
About question one , Your answer is that aspose.cad don't support CAD conversion HD pictures (JPG.PNG)or vectorgraph? Will you support SVG in the next version? see picture 1, it Can't see clearly. (dwg file ref 1.dwg) provide the code .

About question 2, there is a file in the official Demo(DWGDrawings/visualization_-_conference_room.dwg), if I want to convert this file to PDF, if set to 2D, the PDF is blank. We must set this property to 3D. So, if there is a bunch of files, how Automatically set properties and convert them to PDF(iterate over all files)? Can you provide the code for this?

about question 3,6, it will be throw exception when loading. see picture 2.png ,sorry,The cad file is too large to upload。

Hi,

I have investigated the information shared by you and will try answering every question separately.

booway:
About question one , Your answer is that aspose.cad don’t support CAD conversion HD pictures (JPG.PNG)or vectorgraph? Will you support SVG in the next version? see picture 1, it Can’t see clearly. (dwg file ref 1.dwg) provide the code .


The support for exporting DWG to SVG is in product road-map but not in near future. We have already linked the concerned issue with this thread so that you may receive automatic notification once the support will be available. However, I have further worked over your requirements for generating the image with better quality and have shared the sample code in attached file CadToImage.txt. The generated image (1_CUSTOM SCALING_.jpg)is also attached for your kind reference.

booway:
About
question 2, there is a file in the official
Demo(DWGDrawings/visualization_-_conference_room.dwg), if I want to
convert this file to PDF, if set to 2D, the PDF is blank. We must set
this property to 3D. So, if there is a bunch of files, how Automatically
set properties and convert them to PDF(iterate over all files)? Can you
provide the code for this?


Unfortunately, there is no automatic routine available to identify if the DWG has TypeOfEntities in 2D or 3D and automatically sets the rasterizationOptions.setTypeOfEntities() either to 2D or 3D. However, I have written a routine for your convenience in GET2DOR3D.TXT, that traverse all the entities in CAD image to identify 2D or 3D entities. If 3D entity is found, it set a local Boolean variable if3d to true. Based on set value of if3d, the appropriate value is set in rasterizationOptions.setTypeOfEntities(). This scheme is applicable to image examples that you have shared with us and also the one you have mentioned in your previous post. You can further alter the code as per your requirements.

booway:

about question 3,6, it will be throw exception when loading. see picture 2.png ,sorry,The cad file is too large to upload。


For this issue, we need to have the source file so that we may verify that on our end to help you further.

Many Thanks,

thanks for you help.

about question 3,6. Source files can not be uploaded, mail may be sent successfully,<span id=“w_42” high-light-id=“w_9,w_42” class="" style=“color: rgb(51, 51, 51); font-family: Arial, STHeiti, 宋体, “WenQuanYi Micro Hei”, sans-serif; font-size: 14px; background-color: rgb(249, 249, 249);”>Give <span id=“w_43” high-light-id=“w_10,w_43” class="" style=“color: rgb(51, 51, 51); font-family: Arial, STHeiti, 宋体, “WenQuanYi Micro Hei”, sans-serif; font-size: 14px; background-color: rgb(249, 249, 249);”>me <span id=“w_44” high-light-id=“w_11,w_44” class="" style=“color: rgb(51, 51, 51); font-family: Arial, STHeiti, 宋体, “WenQuanYi Micro Hei”, sans-serif; font-size: 14px; background-color: rgb(249, 249, 249);”>your <span id=“w_45” high-light-id=“w_13,w_45” class="" style=“color: rgb(51, 51, 51); font-family: Arial, STHeiti, 宋体, “WenQuanYi Micro Hei”, sans-serif; font-size: 14px; background-color: rgb(249, 249, 249);”>e-mail <span id=“w_46” high-light-id=“w_14,w_46” class="" style=“color: rgb(51, 51, 51); font-family: Arial, STHeiti, 宋体, “WenQuanYi Micro Hei”, sans-serif; font-size: 14px; background-color: rgb(249, 249, 249);”>address .

Hi,

You can please visit these guidelines for sharing the data privately with us. Since your file is big, you can host the file on any public FTP, Dropbox or Google drive and sharing the download link with us. We will download the required file and after that you may remove them from online source. Please notify us here once you have shared the information privately.

Many Thanks,

about CADJAVA-131 、 CADJAVA-132 、 CADJAVA-133

Whether it has been modified?

Hi,

I have observed your comments and regret to share that issue CADJAVA-133 is related to providing SVG export support in Aspose.CAD. This is a new feature request and at present it has not been added in near future plans. As far as issues CADJAVA-131 and CADJAVA-132 are concerned, they are added as issues and at the moment pending for investigation in our issue tracking system. We will share the feedback with you as soon as it will be shared by our product team.

Many Thanks,

about the issue,Some CAD cannot resolve now,When can be modified ?

ps:Can parse the table in CAD, get the row, column, and merge cell information form the CAD? Give me some code?

Hi,

I have observed your comments and like to share that for associated issues, we will share the notification with you once they will be resolved.

As far as your requirement related to accessing of table rows and columns, and merging of table cells is concerned, I regret to share that at present the requested support is unavailable. An issue with ID CADJAVA-135 has been created in our issue tracking system to further investigate the requirement of accessing table rows and columns. A separate issue with ID CADJAVA-136 has been created to investigate the requirement of merging cells belonging to row or columns of a CAD table. This thread has been linked with the issues so that you may be automatically notified once the support will be available.

Many Thanks,

Hi,

We have investigated your following requirements related to accessing table rows and columns along with requirement for merging cells inside table.

booway:
Can parse the table in CAD, get the row, column, and merge cell information form the CAD? Give me some code?


In order to further investigate the requirement can you please share the sample file elaborating your requirements for accessing table rows and columns and also merging cells inside table. Please share requested information so that we may help you further.

Many Thanks,

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

The issues you have found earlier (filed as CADJAVA-135) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz

The issues you have found earlier (filed as CADJAVA-133) have been fixed in this update.