-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Description
I am using the latest NuGet GhostScript and I am facing this issue:
string outputFolder = @"C:\Users";
string inputFile = @"C:\"
var xDpi = 300; //set the x DPI
var yDpi = 300; //set the y DPI
var pageNumber = 1; // the pages in a PDF document
(var rasterizer = new GhostscriptRasterizer()) //create an instance for GhostscriptRasterizer
{
rasterizer.Open(inputFile); //opens the PDF file for rasterizing
//set the output image(png's) complete path
var outputPNGPath = Path.Combine(outputFolder, string.Format("0.png"));
//converts the PDF pages to png's
var pdf2PNG = rasterizer.GetPage(xDpi, yDpi, pageNumber);
//save the png's
pdf2PNG.Save(outputPNGPath, ImageFormat.Png);
Console.WriteLine("Saved " + outputPNGPath);
}
pdf2png vertical and horizontal resolution always default to 96 or 120
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels