title: JavaFX Can't Display PDF using WebView?
body: <p>in JavaFX WebView can't show pdf file from local source which is my PC and I'm sure that the path is 100% correct</p>
  <p>public class WebViewExample extends Application
  {</p>
  <pre><code>public void start(Stage primaryStage)
  {
      primaryStage.setTitle(&quot;JavaFX WebView Example&quot;);
      
      WebView webView = new WebView();
      webView.getEngine().load(getClass().getResource(&quot;testing_area/sample.pdf&quot;).toExternalForm());
  
      Pane Pane1 = new Pane(webView);
      
      Scene scene = new Scene(Pane1, 800, 600);
      primaryStage.setScene(scene);
      primaryStage.show();
  
  }
  public static void main(String[] args)
  {
      launch(args);
  }
  </code></pre>
  <p>}</p>