Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 22, 2021 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/cc645bc3737cb41482f96cc05443290e to your computer and use it in GitHub Desktop.
Save aspose-com-gists/cc645bc3737cb41482f96cc05443290e to your computer and use it in GitHub Desktop.
Convert DWF to PDF File Programmatically 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