PDF格式为PNG高分辨率 [英] PDF to PNG with high resolution
问题描述
我想转换为PDF文件,PNG,我要输出为595 * 842的高分辨率,
我用这个命令:
gswin64.exe -q -sDEVICE = png16m -dSAFER -dMaxBitmap = 10亿
-dTextAlphaBits = 4 -dGraphicsAlphaBits = 4 -dPDFFitPage =真 - sDEVICE = pngalpha -dBATCH -dNOPAUSE -sOutputFile = C:\cover.png C:\cover.pdf
块引用>
我知道,我可以使用
-r300
但它将尺寸变为2479 * 3509
也有,我已经试过-sPAPERSIZE = A4 + - R300
没有工作。
我怎么能在595x842的输出分辨率高?
当前代码:
ProcessInfo =新System.Diagnostics.ProcessStartInfo(gswin64.exe, - q = -sDEVICE pngalpha -dBATCH -dNOPAUSE -sOutputFile = C:\\Users\\MNiyatkhair\\Desktop\\cairoCopy\\cover.png C:\\Users\ \MNiyatkhair\\Desktop\\cairoCopy\\Holding.pdf);
// -r300
ProcessInfo.CreateNoWindow = TRUE;
ProcessInfo.UseShellExecute = TRUE;
ProcessInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
=过程的Process.Start(ProcessInfo); Process.WaitForExit();
解决方案您可以尝试增加图像的分辨率(例如-r(72 * 3)),并添加比例下限系数 -dDownScaleFactor = 3 。它会像原生PDF MatrixTransform。
I want to convert a PDF file to PNG, I want the output to be 595*842 with high resolution,
I used this command:
gswin64.exe -q -sDEVICE=png16m -dSAFER -dMaxBitmap=1000000000 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dPDFFitPage=true -sDEVICE=pngalpha -dBATCH -dNOPAUSE -sOutputFile=C:\cover.png C:\cover.pdf
I know that I can use
-r300
but it will change the dimension to 2479*3509 also, I've tried-sPAPERSIZE=a4 + -r300
which didn't work.How can I have the output in 595x842 with high resolution?
Current code:
ProcessInfo = new System.Diagnostics.ProcessStartInfo( "gswin64.exe", "-q -sDEVICE=pngalpha -dBATCH -dNOPAUSE -sOutputFile=C:\\Users\\MNiyatkhair\\Desktop\\cairoCopy\\cover.png C:\\Users\\MNiyatkhair\\Desktop\\cairoCopy\\Holding.pdf" ); // -r300 ProcessInfo.CreateNoWindow = true; ProcessInfo.UseShellExecute = true; ProcessInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; Process = Process.Start(ProcessInfo); Process.WaitForExit();
解决方案You can try to increase the image resolution (for example -r(72*3)) and add proportional downscale factor -dDownScaleFactor=3. It will work like native PDF MatrixTransform.
这篇关于PDF格式为PNG高分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!