fill-pdf icon indicating copy to clipboard operation
fill-pdf copied to clipboard

Filling Asian charicters

Open SpringsTea opened this issue 6 years ago • 4 comments

I'm doing some form filling and have to accommodate Japanese text. This does not seem to be supported with the default options.

let FillData = {
    text: 'ベルゼルグ王国第一王女 アイリス'
}

fillPdf.generatePdf(FillData, Form.path, function(err, output) {
      if ( !err ) {
          res.type("application/pdf");
          res.send(output);
      }
});

This will output a pdf with my text field filled with: ã…Žã…«ã‡¼ã…«ã‡°ç”‰åł½ç¬¬ä¸•ç”‰å¥³ ㇢㇤ㅪㇹ

How do I configure this to allow the correct encoding?

SpringsTea avatar Dec 28 '19 21:12 SpringsTea

I have the same issue..

may be the problem comes from the function

escapeFdf(data)

librorum avatar Jan 08 '20 15:01 librorum

Having the same problem with Swedish characters "åäöÅÄÖ". Tried adding the extra argument need_appearances but that did not help https://www.pdflabs.com/docs/pdftk-man-page/#dest-output-need-appearances =(

Mousaka avatar Mar 18 '20 15:03 Mousaka

I'm also having this issue when trying to use it like this fillPdf.generatePdf(data, filePath, ['need_appearances'], (err, output) => (err ? reject(err) : resolve(output)))

ysarzhynskyi avatar Apr 23 '20 20:04 ysarzhynskyi

Same for Czech characters too.

michaeldoubek avatar Dec 20 '20 23:12 michaeldoubek