Hi,
according to your docs Aspose.Imaging can convert DXF files to PDFs. But when I try to do that I get the following exception:
Image image = Image.load(file.getAbsolutePath());
PdfOptions pdfOptions = new PdfOptions();
image.save(pdfFile.getAbsolutePath(), pdfOptions);
com.aspose.imaging.exceptions.ImageLoadException: Image loading failed.
at com.aspose.imaging.Image.a(Unknown Source)
at com.aspose.imaging.Image.load(Unknown Source)
I’m attaching the file I tested.
Thanks in advance for any help.
Mariusz
With a different file I get a different exception, this time during saving.
Caused by: class com.aspose.imaging.internal.Exceptions.SystemException: class com.aspose.imaging.internal.Exceptions.ArgumentException: Page size incorrect
com.aspose.imaging.internal.bs.t.export(Unknown Source)
com.aspose.imaging.Image.save(Unknown Source)
com.aspose.imaging.Image.save(Unknown Source)
Please check the attached files. I cannot convert any of them.
Thanks in advance for any help with this.
Mariusz
Hi Mariusz,
Thank you for providing the sample files.
We are able to replicate ImageLoadException for a few of your provided samples, although we are unable to experience SystemException/ArgumentException as stated in your recent post. Please check the code snippet provided at the last of this post, and give it a try on your end.
Please check the below details against each of your sample files.
- WOOD DETAILS.dxf OK
- A_000217.dxf Image Loading Failed IMAGING-34089
- Tyrannosaurus.DXF OK
- Tamiya TT-01.DXF OK
- SMA-Controller.dxf Image Loading Failed IMAGING-34090
- Shapefont.dxf OK
- Proposed Townhouse.dxf OK
- pic_programmer.dxf Image Loading Failed IMAGING-34091
- Nikon_D90_Camera.DXF OK
- Mechanical Sample.dxf OK
- Mc Cormik-D3262.DXF OK
- Lock-Off.dxf OK
- kit-dev-coldfire-xilinx_5213.dxf Image Loading Failed IMAGING-34092
- house design.dxf OK
- house design for two family~.dxf OK
- gekko.DXF OK
- Floor plan.dxf OK
- Controller-M128-top.dxf OK
- BIKE.DXF OK
- AEC Plan Elev Sample.dxf OK
Please note, the testing was performed while using latest version of Aspose.Imaging for Java 2.1.0 with JRE7 and the following piece of code.
Java
// Load an DXF file
Image image = Image.load(filename);
// Create an instance of PdfOptions
PdfOptions pdfOptions = new PdfOptions();
// Set output page size
pdfOptions.setPageWidth(800);
pdfOptions.setPageHeight(600);
// Export
image.save(myDir + “output.pdf”, pdfOptions);
We have attached the tickets IMAGING-34089, IMAGING-34090, IMAGING-34091 & IMAGING-34092 to this thread for tracking purposes. Please spare us little time to analyze the problem cause, and to provide fix for the tickets stated above. In the meanwhile, we will keep you posted with updates in this regard.
Hi,
just checking if there is any update on this?
Thank you,
Mariusz
Hi Mariusz,
We are sorry, the tickets attached to this thread are not resolved yet therefore they may not be included in the upcoming release of Aspose.Imaing for Java 2.4.0. We have requested the core development team to provide updates in this regard. As soon as more information comes in, we will post here for your kind reference.
Please accept our sincere apologies for the inconvenience caused to you.
Hi Mariusz,
We have received updates from the core development team on your reported issues of loading DXF files with Aspose.Imaging for Java API. Please note, these problems are caused due to the reason that your provided samples have R12 file format. We have planned to support the aforesaid format with Aspose.Imaging for Java in the last quarter of 2014. In the meanwhile, if you can re-save these DXF files in 2010 file format, you can load them with Aspose.Imaging for Java API.
As soon as we receive more updates in this regard, we will post here for your kind reference.
The issues you have found earlier (filed as IMAGING-34092;IMAGING-34091;IMAGING-34090;IMAGING-34089) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.