Question: In a Web application, is it possible to force a PDF file to be printed on the client? If the browser is configured to open the PDF inside the window, I guess that calling window.print() will work, but some browsers (like mine) are configured to open the PDF externally.

Answer: 
similarly to taeyoung's suggestion you can use an iframe to render the pdf and then use contentWindow.print();
You can't print a PDF document directly from browser using Javascript.
The Javascript function window.print() use the browser printing function and this is not what you need.
You can achieve your aim starting the print through Java Web Start.
Put your PDF document directly into the jnlp so you can run a Java program that recieve the raw PDF document as argument.
Now you're running in the system and no longer in the browser, so you can directly interface with printing driver through JAVA API.
This seem quite simple but really it's not because the JAVA printing API doesn't accept a file as input but a particular data structure that implements the ava.awt.print.Pageable interface.

Exist a web service at [www.pdfprint.it](http://www.pdfprint.it) that do all the work for you.
Here a snippet taken from the official documentation. 

```
<?php

// 1. GET the jnlp file with curl

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.pdfprint.it/printPdf?auth=XXXX");        
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return the transfer as a string       
$jnlp = curl_exec($ch);
curl_close($ch); 

$pdfDoc ="example.pdf";

//2. put in the jnlp your PDF document base64 encoded

$jnlp = str_replace("####", base64_encode(file_get_contents($pdfDoc)),$jnlp);

//3. echo the jnlp file 

header('Content-type: application/x-java-jnlp-file');

echo $jnlp;

```

You only need to get the jnlp file, put in your PDF document and send the jnlp to the browser. 
The JAVA program that run the printing will be dowloaded directly from the web service.
You can also set some printing options as copies, sides, and so on