title: How to display print dialog in java fx and print documents (not just nodes)
body: <p>I am trying to print a generated pdf file in a java fx but all the examples I have seen are for printing java fx nodes. I could have used the ordinary printing api but the print dialog it shows is swing based and is like a totally different application in both behaviour and appearance, which may confuse users.</p>
  
  <p>I'd like to show a dialog prior to printing so that users can choose their preferred printer and also change page setup if possible. According to <a href="https://wiki.openjdk.java.net/display/OpenJFX/Printing+for+JavaFX" rel="nofollow">the open jdk wiki</a>  this was expected in java 8 </p>
  
  <blockquote>
    <p>1) PrinterJob - the class that controls the printing process  and
    provides support for<br>
    *  print and page setup dialogs which will be
    the platform native dialog
         at least on Windows and Mac OS X.</p>
  </blockquote>
  
  <p>and <a href="https://javafx-jira.kenai.com/browse/RT-17383" rel="nofollow">the related jira issue</a> is marked as fixed</p>
  
  <p>However this <code>PrinterJob</code> class and the javafx print package has two issues(as far as I can tell):</p>
  
  <ol>
  <li>It prints only nodes.</li>
  <li>No clear way of displaying a dialog for users to choose printing attributes</li>
  </ol>
  
  <p>So how can I provide a printing dialog in java fx to help users print pdf documents? </p>
  
  <p><strong>PS:</strong> I'm using Java 8 update 20 in a desktop environment (Windows 7 64 bit)</p>
  
  <p>Any pointers are appreciated.</p>