title: Saving a datawindow as PDF in PB 10.5
body: <p>I have a grid datawindow with a picture in it's background (with dimensions of an A4 page) and I would like to export both data and the picture as a (single page) PDF file. I used several combinations of the following commands but at most I got a 0-sized pdf. </p>
  
  <pre><code>//dw_1.Modify("Datawindow.Export.PDF.Method = Distill! ")
  //dw_1.Modify("DataWindow.Export.PDF.Method = XSLFOP! ")
  
  dw_1.Object.DataWindow.Export.PDF.Method = Distill!
  //dw_1.Object.DataWindow.Printer = "\\prntsrvr\pr-6"
  dw_1.Object.DataWindow.Export.PDF.Distill.CustomPostScript="No"
  dw_1.SaveAs("c:\dw_one.pdf", PDF!, false)
  </code></pre>
  
  <p>User’s guide (on page 533) says:</p>
  
  <p><code>… the data is printed to a PostScript file and automatically distilled to PDF using GNU Ghostscript…</code></p>
  
  <p><code>Installing Ghostscript</code></p>
  
  <p><code>For licensing reasons, Ghostscript is not installed with PowerBuilder. You (and your users) must download and install it before you can use this technique…</code></p>
  
  <p>Does anyone have any idea what is the procedure?</p>
  
  <p><strong>EDIT</strong>
  THANK YOU ALL. Installing ghostscript proved to be enough. I only cannot understand why the procedure is successful on some fellows PCs (using Method = XSLFOP!) without using ghostscript :-/</p>