make pdfexport work with documentdate

@maethu could you please take a look at this?