Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 16, 2022 08:18
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/7d3632cbc8a7c21cbd6c6685d785aa94 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/7d3632cbc8a7c21cbd6c6685d785aa94 to your computer and use it in GitHub Desktop.
Convert PCL to PDF Programmatically in C# .NET
// Load input PCL file
using (FileStream inStream = new FileStream("file.pcl", FileMode.Open))
using (Image image = Image.Load(inStream))
using (FileStream stream = new FileStream("sample.pdf", FileMode.Create))
{
// Set properties for output PDF file
ImageOptionsBase options = new PdfOptions();
options.VectorRasterizationOptions = new CadRasterizationOptions()
{
PageHeight = 1000,
PageWidth = 1000
};
// Save output PDF document
image.Save(stream, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment