title: How can I convert a base64 string to a base64 PDF string?
body: <p>I would appreciate if someone could shed light to a problem I'm having.</p>
  
  <p>I'm using a .pdf viewer in AngularJS that from a base64 shows the document in a modal. This works well when the base64 is generated from a .pdf document.</p>
  
  <p>This base64 is generated in the backend (Java) using the <code>Base64.getEncoder().encodeToString()</code> function.</p>
  
  <p>Is there a way to encode (it can be with JavaScript or Java) a different type of file (.jpeg, .png, .docx), to a base64 that represents that file but in .pdf format?</p>
  
  <p>If my question is unclear, please feel free to correct me!</p>
  
  <p>Thanks in advance.</p>