First step of pdf export.