fix pdf export with pagination