title: PowerBuilder 12.5 Classic GhostScript blank pdf
body: <p>I am using window 7 x32. PowerBuilder 12.5 Classic and GhostScript 9.1w32</p>
  
  <p>I am trying to update an old script which used to use a Jaguar server to generate PDF documents, but for whatever reason that is no longer supported/working with PB12.5. </p>
  
  <p>I have installed GhostScript 9.1 and the registry <code>HKLM\SOFTWARE\GPL Ghostscript\9.1\GS_DLL</code> points to <code>gsdll32.dll</code> and I have a Sybase DataWindow PS printer available (using windows HP driver as per <a href="https://stackoverflow.com/a/2463367/939697">this post</a>)</p>
  
  <p>The PB Code I am using to generate the PDF is:</p>
  
  <pre><code>lstr_pdf_props.s_string[1] = "filename.pdf"
  ...
  dw_statement.Object.DataWindow.Export.PDF.Method = Distill!
  dw_statement.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
  dw_statement.SaveAs(lstr_pdf_props.s_string[1], PDF!, false)
  </code></pre>
  
  <p>This completes without error and creates a <code>C:\filename.pdf</code> file 3kb in size, however it is a blank page, the file opens in adobe reader but there is no writing or anything printed, just a blank white page.</p>
  
  <p>Does anyone have any ides as to what might be going on here?
  thanks.</p>