start of a pdf rebuilder