title: Can't print PDF in Java
body: <p>I'm trying to print some PDFs using Java and I've found a few examples on how to do it. Seems pretty straight forward, but I've been running into problems the whole way.</p>
  
  <p>I first tried PDFBox and it prints, but it doesn't print the document how it should look. A lot of the text gets garbled for some reason. So then I tried using the included Java packages <a href="https://stackoverflow.com/a/10526325/1053066">this way</a> and with an <a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jps/spec/appendix_printPS.fm.html" rel="nofollow noreferrer">example from Oracle</a> but nothing happens. I run the program, I check the print queue in the OS and the job is there, but the printer does nothing. My program exits gracefully with no errors and the print job goes away after a little while but there's still no action from the printer itself.</p>
  
  <p>As an alternative, I've also tried running Adobe Acrobat from within my program but there are no command line arguments to enable duplexing which I need.</p>
  
  <p>If anyone can either help me fix this, suggest another package or command line tool, it would be much appreciated. Thanks!</p>