generate PDF in client locale, closes #4261