trying to fix pdf generation, attempt 8

fixed a lot of formatting issues by this point