title: Convert base64 to PDF in Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/469695/decode-base64-data-in-java">Decode Base64 data in Java</a>  </p>
  </blockquote>
  
  
  
  <p>I have a method that takes in a <code>String</code>, which is a Base64 encoding of a PDF document. How can I decode the binary back into a PDF file and then save the PDF file (or just pass back the file as a <code>File</code> object so the next program can use it).</p>
  
  <p>I need to do this using Java.</p>