DWG - PDF

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
FrankBacker
Posts: 1
Joined: 09 Jan 2021, 22:15
Contact:

DWG - PDF

Post by FrankBacker » 09 Jan 2021, 22:20

Please let me know how i could convert a DWG to PDF file ?

Thanks for alot.

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: DWG - PDF

Post by support » 12 Jan 2021, 00:25

Hello Frank,

Please use the following code.

Code: Select all

public static void ConvertDWGtoPDF(string dwgFilePath, string pdfFilePath)
{
    CADImage cadImage = CADImage.CreateImageByExtension(dwgFilePath);
    cadImage.IsWithoutMargins = true;
    cadImage.LoadFromFile(dwgFilePath);
    Export.CADToPDF pdf = new Export.CADToPDF(cadImage);
    pdf.SaveToFile(pdfFilePath);
}
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply