Convert DXF file into PDF using Aspose.CAD for .NET

Hello!

I would like to know if there is a way to convert a DWF file into PDF. I’ve found this documentation DWF Drawings|Documentation and tried to reproduce the same, but it says that the system is unable to read the dwf file.

The reason I am asking for this functionality is that, some users have IPAD and they want to see the drawings from it. Also there is no Autodesk Application supported for IOS. So I am trying to develop a web application to fulfill their requirements.

Does someone knows how to convert the DWF?

Thanks in advance.

@felipecomps,

I have observed your requirements and suggest you to please try using latest Aspose.CAD for .NET 18.3 on your end. If there is still an issue then please share the source DWF file causing issue on your end and we shall investigate that further.

Thanks for the reply @mudassir.fayyaz. I just tried the version 18.3 and the type DwfRasterizationOptions is no longer being recognized.
And, if I use CadRasterizationOptions instead, it throws the same error: “Unable to read dwf content”.

Also, debugging it, the problem lies on the Image.Load. Here’s what I have:

string MyDir = “C:\temp\”;
string fileName = MyDir + “2-1-406B.dwg.dwf”;

        var teste = Aspose.CAD.Image.CanLoad(fileName);

        using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(fileName))
        {
            var pdfOptions = new PdfOptions();
            var dwfRasterizationOptions = new CadRasterizationOptions();
            pdfOptions.VectorRasterizationOptions = dwfRasterizationOptions;
            dwfRasterizationOptions.CenterDrawing = true;
            dwfRasterizationOptions.PageHeight = 500;
            dwfRasterizationOptions.PageWidth = 500;
            dwfRasterizationOptions.Layouts = new string[] { "Model" };
            // export
            string outPath = fileName + ".pdf";
            image.Save(outPath, pdfOptions);
        }

@felipecomps,

Thank you for sharing the details with us. As requested earlier, please provide the source DWF file causing issue on your end so that I may investigate that to help you.

testDrawing.zip (43.8 KB)

Ok, find it attached. Thanks again for the help.

@felipecomps,

I have worked with the DWF file shared and have been able to observe the issue. An issue with ID CADNET-596 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

That’s great. Thank you!

Hello.

Would you have an update on this?

@felipecomps,

I have observed your comments. I regret to inform that issue is still unresolved. We will share good news with you soon. I request for your patience.

Any luck on this one?

Thank you!

@felipecomps,

I have observed your comments. I like to share that this issue is going to be resolved tentatively in Aspose.CAD 18.6. We will share good news with you soon.

Hi,

I have a question on converting .dwf file to .pdf file by using C#/Asp.Net programming. Which version of Aspose.CAD .dll files should be used to convert .dwf version 00.06 (DWF V00.06) file to .pdf?

@Gkrao,

I suggest you to please try using latest Aspose.CAD for .NET 18.8 on your end. If there is still an issue, please feel free to share the information with us along with used sample code and source files.

@Gkrao,

Thank you for sharing the information with us. An issue with ID CADNET-692 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Is there any timelines for this issue resolution? Actually we thought of purchasing license for this Aspose.CAD dll if the file conversion is happening successfully for old .dwf file?

@Gkrao,

The issue has just recently been added in our issue tracking system and is pending in issues queue at the moment. We will be able to share any tentative ETA with you once the issue will be scheduled for investigation and resolution in our issue tracking system. We request for your patience till the time the investigation gets completed on our end.

Found issue that sounds the same with the CAD 18.3 for Java - “com.aspose.cad.cadexceptions.ImageLoadException: Image Loading Failed”.
DWF attached.
VizProject3d.DWF.zip (2.9 MB)

@simon.wiseman,

I have worked with the DWF file shared and have been able to observe the issue. An issue with ID CADJAVA-406 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

I’m experiencing exactly the same issue. Any solutions yet? Can we use an older version of the Aspose.CAD to get around the issue? I’m using 18.8.0.0

@robparmenter,

I have observed your comments and request you to please share the source file, generated output and working sample code reproducing the issue. We will be able to investigate the issue on our end on provision of requested information.