Click here to Skip to main content
15,510,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I convert PDF to images and set the dpi to 300 but the vertical and horizontal resolution values always default to 120 I am using version 9.26
This is how I do it:
Is there a way to set it differently?

What I have tried:

<pre>       Image pdf2PNG = rasterizer.GetPage(xDpi,yDpi, pageNumber);

                    //save the png's
                    pdf2PNG.Save(outputPNGPath, ImageFormat.Tiff);

Also tried:
rasterizer.CustomSwitches.Add("-r300x300");
Posted
Updated 9-Feb-20 11:59am
v2
Comments
Gerry Schmitz 10-Feb-20 10:55am    
I think you confusing printer DPI with screen DPI (96 and 120).
AskalotLearnalot 10-Feb-20 11:05am    
Either way it should be set to 300 if I specify. and now it is always 96 . pdf2PNG vertical and horizontal resolution = 96
Richard Deeming 11-Feb-20 8:50am    
It looks like you're using Ghostscript.NET[^] - you might have better luck posting an issue on GitHub, where the author of the library can see it.
AskalotLearnalot 11-Feb-20 9:51am    
I did thank you for the Idea and being always helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900