Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
Created April 23, 2025 20:54
Show Gist options
  • Save conholdate-gists/86ed0647f9b095ebeb7b03709e98a576 to your computer and use it in GitHub Desktop.
Save conholdate-gists/86ed0647f9b095ebeb7b03709e98a576 to your computer and use it in GitHub Desktop.
Convert DWF to PDF in C#
// Load the input DWF file
Image image = Image.Load("DWFtoPDF.dwf");
// Create an object of CadRasterizationOptions to set different properties
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions()
{
PageWidth = 1600,
PageHeight = 1600,
ContentAsBitmap = true
};
// Convert DWF to PDF
image.Save("output.pdf", PdfOptions
{
VectorRasterizationOptions = rasterizationOptions
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment