Alternative to latex / way to type good quality documents from Java to PDF

I am working on a Java application that will maintain a database of lyrics in text format and print out some songbooks / chordbooks (i.e. create a PDF from selected songs). I planned that the Java application would generate the source code for pdflatex and after compiling this source, the user will receive a PDF file.

Lately I have had a lot of problems due to latex limitation: fixed memory size (some images will also be drawn in PDF format) - error when exceeded, in no way can request end of line or page, it is very difficult to override latex placement algorithm with complex way ... see also some of my other questions regarding latex. I have come to the conclusion that latex is not a good option for automatic PDF generation.

So I need a replacement. I need to be able to type:

  • Chords over lyrics when the text in a variable char is wide, so I need to be able to measure the width of the text
  • Chord charts, which means I'll have to draw some pretty complex photographs.
  • Each song on a separate double page
  • Various fonts, etc.

Thanks for all the answers

+2


a source to share


5 answers


Here are some open source PDF APIs http://java-source.net/open-source/pdf-libraries



This has been asked many times , you might want to look at this post

+1


a source


IText is a free library that offers many possibilities for creating PDF files programmatically.



+1


a source


Instead of trying to manipulate / calculate the complexity of your desired layout, you can try Docmosis . This will allow you to compose your document as a template using doc or odt formats. This means that if you can make a document or odt look the way you want, you can turn it into a template and have Docmosis present as PDF. Text and images can be placed inside or outside tables, making layout management easier.

+1


a source


ConTeXt is another TeX system, but easier to manage the layout than with LaTeX. For drawing, you can use PGF / TikZ or MetaPost , Support for both is available in ConTeXt. With ConTeXt, created in Lua scripting, you can draw chords automatically, assuming you've stored them in some data structure.

+1


a source


why not just use lilypond

with latex? it meant for typing.

0


a source







All Articles