0

Our Client asked our team to implement print functionality for companies which are their clients. The page where they add companies has an textarea which they use to write short description. However they sometimes copy and paste from MS Word or other sources. When copied in the textarea it looks normal, but when printed it often contains strange characters (see the printscreen at the following URL http://prntscr.com/4oadw3 )

Is there any way we can clean what they paste before we convert the HTML to PDF? I would appreciate your help with this. Thanks

Nic
  • 12,220
  • 20
  • 77
  • 105
Krste A.
  • 3
  • 3

1 Answers1

0

You can always do some pre-processing before generating the PDF. Either by properly encoding the "strange characters", or deleting them.

Also check whether the HTML is shown properly in a browser. WKHTMLTOPDF uses webkit to render the HTML.

Having this in the HTML header might help too.

<meta charset="utf-8" />
Nic
  • 12,220
  • 20
  • 77
  • 105