rebuild main.pdf