nearly fixed pdf generation + hpub updates