You can read more details at: Convert PCL to PDF File in C#
Last active
March 16, 2022 08:18
-
-
Save aspose-com-gists/7d3632cbc8a7c21cbd6c6685d785aa94 to your computer and use it in GitHub Desktop.
Convert PCL to PDF Programmatically in C# .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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