title: Alternative to latex / a way to typeset good looking documents from Java to PDF
body: <p>I'm working on application in Java that will maintain database of song lyrics in plain text and print out some songbooks/chordbooks(that is create PDF file from selected songs). I was planing that the Java application will generate source code for pdflatex and after compiling this source user will get PDF file.</p>
  
  <p>Lately I've run into a lot of problems because of latex limitation: fixed memory size (some pictures will also be drawn to PDF) - error when exceeded, no way to query end of line or and of page dynamically, it's very hard to override latex placement algorithm in a complex way,... see also some my other questions regarding latex. I come to conclusion that latex is not good option for automated PDF generation.</p>
  
  <p>So I need replacement. I need to be able to typeset:</p>
  
  <ul>
  <li>Chords over lyrics when the lyrics are in variable char width so I need to be able to measure text width</li>
  <li>Chord diagrams that means I'll have to draw quite complex pictures</li>
  <li>Each song on separate double page</li>
  <li>Different fonts etc.</li>
  </ul>
  
  <p>Thanks for all answers</p>