Click here to Skip to main content
11,411,128 members (61,402 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 C# C#4.0
How can I convert from DWG "autocad file " to PDF in c#.net?

Thanks for any help.
Posted 22-Aug-10 21:09pm
Edited 22-Aug-10 23:21pm
v3
Comments
Dalek Dave at 23-Aug-10 4:21am
   
Edited for Spelling, Grammar, Syntax and removal of Txtspk.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

It is an incredibly difficult thing you are asking.
Autocad holds drawing data in a totally different format from PDF, and you would have to access the drawing data, and effectively draw in memory then copy that to a pdf file.

A DWG file may be several GB in size, and yet the equivalent PDF, less than one meg.

It would be a major undertaking to write this as an element in your code.
Seriously, many man months of work and thousands of pounds.

I would suggest you take advantage of third party apps and maybe modify as plugins.
  Permalink  
Comments
wout de zeeuw at 6-Mar-11 6:18am
   
Quote: "A DWG file may be several GB in size"

I have yet to see such large files, several dozens of MB is already quite a large drawing. Was it a typo, or did you actually ran across such large files?

Quote: "many man months"
Couple of man years actually.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I have to do this quite often, as I do my design work in AutoCAD, but many of the people who need to receive my designs don't have AutoCAD available. The best solution I've found is a free utility, CutePDF, which installs as a printer device. When I need to make the conversion, I load the drawing in AutoCAD, plot it, and select CutePDF as the printer. That pops up a dialog box to ask what I want to call the file, and where I want to store it. The result is a PDF file that works perfectly.

If you don't have AutoCAD, and just want to make a standalone file conversion, it gets ugly. There are a lot of free conversion tools out there, and none I've found works very well. There are also some commercial programs to do this, but I haven't tried them as my budget doesn't cover too many toys that may, or may not work.
  Permalink  
Comments
Volynsky Alex at 24-Apr-14 13:12pm
   
Nice

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 189
1 Maciej Los 108
2 OriginalGriff 88
3 Sascha Lefévre 85
4 BillWoodruff 80
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 6,918
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 17 Dec 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100