Generate-pdf: Build pdf twice to take into account background images