Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C C#4.0
how to convert the dwg to pdf in c# window application
Posted 2-Jan-13 20:00pm
Harikas591
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Refer similar discussion: convert from dwg to pdf[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

{
SaveFileDialog savedlg = new SaveFileDialog();
string st = savedlg.FileName;
// AcApp.ActiveDocument.SaveAs(st) ;

int fileExtPos = st.LastIndexOf(".");
if (fileExtPos >= 0)
st = st.Substring(0, fileExtPos);
 
AcadDocument doc = AcApp.ActiveDocument;
AcadSelectionSet ss = doc.SelectionSets.Add("MySet");
ss.Select(AcSelect.acSelectionSetAll, null, null, null, null);
try
{
if (ss.Count > 0)
{ doc.Export(st, "pdf", ss);
MessageBox.Show("Saved....");
AcApp.Quit();
}
 
}
finally
{
ss.Delete();
}
}
  Permalink  
Comments
Sandeep Mewara at 5-Jan-13 0:40am
   
What is this code for?

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

  Print Answers RSS
0 Maciej Los 225
1 BillWoodruff 200
2 OriginalGriff 191
3 Kornfeld Eliyahu Peter 175
4 CPallini 164


Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 4 Jan 2013
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