2

PDFレポートを生成する必要がありますが、問題はペルシャ語でレンダリングできないことです。簡単な例:

var http = require('http');
var jsreport = require('jsreport');

http.createServer(function(req, res) {
    jsreport.render({
            template: {
                content: "<h2>سلام</h2>",// means "hello" in persian
                engine: 'jsrender',
                recipe: 'phantom-pdf'
            }
        })
        .then(function(out) {
            out.stream.pipe(res);
        }).catch(function(e) {
            res.end(e.message);
        });

}).listen(3031, '127.0.0.1');

生成された PDF には何か間違っていて読めないものが含まれています。アドバイスをありがとう。

4

1 に答える 1