Optimize alternate PDF generation
Merge origin/master