Click here to Skip to main content
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 20:09pm
Edited 22-Aug-10 22:21pm
Dalek Dave432.5K
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 6

CadLib[^] supports DXF/DWG to PDF conversion. There is a Dxf export example in the evaluation version that demonstrates how to do this (along with export to several image formats like bmp, png, tif etc).
 
- Wout
  Permalink  
Comments
surajemo at 1-Jun-13 11:14am
   
is there any way to convert dwg file to pdf in c#
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

  Permalink  
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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 12

1.sava as bim or jpg
2. use a plugin which can convert from jpg to pdf
  Permalink  

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 383
1 OriginalGriff 304
2 George Jonsson 258
3 Animesh Datta 130
4 Shemeemsha RA 128
0 OriginalGriff 6,099
1 Sergey Alexandrovich Kryukov 5,411
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 27 May 2014
Copyright © CodeProject, 1999-2014
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