Improved the PDF generation

First attempt to compress the beat spacing