Add loadmask for pdf generation

This PR adds a loadmask during pdf extract generation, which can be long...to very long