title: PDF to PNG with high resolution
body: <p>I want to convert a PDF file to PNG, I want the output to be 595*842 with high resolution,</p>
  
  <p>I used this command:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>I know that I can use <code>-r300</code> but it will change the dimension to 2479*3509
  also, I've tried <code>-sPAPERSIZE=a4 + -r300</code> which didn't work.</p>
  
  <p>How can I have the output in 595x842 with high resolution?</p>
  
  <p>Current code:</p>
  
  <pre><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(); 
  </code></pre>