title: How to create .pdf, write to it and save it with JFileChooser?
body: <p>I created a <code>ArrayList&lt;Pair&lt;Integer,Integer&gt;&gt;</code> and saved some data into it. I am unable to figure out a way to write it to a pdf and then save it using JFileChooser.</p>
  
  <p>I tried the same thing with a .txt and it works perfectly but it does not seem to work the same way with .pdf.</p>