JSreport sometime generate an error font

  • Hello. Sometime we receive an error font PDF.
    Almost character become "A"

    What's my problem ? How to fix that ? Or where it come from ? PLs suggest me and i will check

  • are you able to replicate the problem in the playground?

  • No. I can't. I dont know how to reproduce that to fix.

    I only know that it's not frequently happen. Randomly.

  • It look like only happen on "accented letters". And another interesting thing is that it just happens randomly. As you can see in the picture, there are places that are faulty, there are places that are not


    I exact font in file PDF and got below


  • My config in a 8 core, 8 Gb Ram machine. Pls review and suggest if i doing something wrong. I using version 2.10.0.

        "httpPort": 5488,
        "reportTimeout": 600000,
        "logger": {
            "console": {
                "transport": "console",
                "level": "error"
            "file": {
                "transport": "file",
                "level": "info",
                "filename": "logs/reporter.log"
            "error": {
                "transport": "file",
                "level": "error",
                "filename": "logs/error.log"
        "allowLocalFilesAccess": true,
        "store": {
            "provider": "memory"
        "blobStorage": {
            "provider": "memory"
        "trustUserCode": false,
        "templatingEngines": {
            "numberOfWorkers": 8,
            "strategy": "in-process"
        "chrome": {
            "launchOptions": {
                "args": [
        "workers": {
            "numberOfWorkers": 2
        "extensions": {
            "authentication": {
                "cookieSession": {
                    "secret": "place_holder_password@cenTos",
                    "cookie": {
                        "secure": true
                "admin": {
                    "username": "place_holder_admin",
                    "password": "place_holder_password"
    			"authorizationServer": {"tokenValidation": {"endpoint": "http://place_holder_url:3000/api/jsreport","auth": false}},
                "enabled": true
            "chrome-pdf": {
                "timeout": 600000,
                "strategy": "chrome-pool",
                "numberOfWorkers": 8

    I only got this error on pm2 log:

    2022-09-13T00:00:49: pdf utils failed to remove the hidden marks from pdf, this has no significant impact, but please report the issue. Error: incorrect header check
        at Zlib.zlibOnError [as onerror] (node:zlib:189:17)
        at processChunkSync (node:zlib:457:12)
        at zlibBufferSync (node:zlib:178:12)
        at Object.syncBufferWrapper [as unzipSync] (node:zlib:792:14)
        at processStream (/jsreportapp/node_modules/jsreport-pdf-utils/lib/utils/processText.js:50:22)
        at processStream (/jsreportapp/node_modules/jsreport-pdf-utils/lib/utils/processText.js:74:13)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async processStream (/jsreportapp/node_modules/jsreport-pdf-utils/lib/utils/processText.js:74:7)
        at async module.exports (/jsreportapp/node_modules/jsreport-pdf-utils/lib/utils/processText.js:215:7)
        at async Object.postprocess (/jsreportapp/node_modules/jsreport-pdf-utils/lib/utils/pdfManipulator.js:104:7)
        at async module.exports (/jsreportapp/node_modules/jsreport-pdf-utils/lib/scriptPdfProcessing.js:83:5)
        at async scriptExecModuleWrapper (/jsreportapp/node_modules/jsreport-core/lib/scriptExecModuleWrapper.js:34:20) {
      errno: -3,
      code: 'Z_DATA_ERROR'


    module.exports = {
      apps: [{
        name: "jsreport-server",
        script: "./server.js",
        instances: 1,
        exec_mode  : "cluster",
        autorestart: true,
        time: true,
        node_args: "--max_old_space_size=1024",

    my server.js running by pm2

    const jsreport = require('jsreport')()
    if (process.env.JSREPORT_CLI) {
      // export jsreport instance to make it possible to use jsreport-cli
      module.exports = jsreport
    } else {
      jsreport.init().then(() => {
        // running
      }).catch((e) => {
        // error during startup

  • So if you put that letter to the playground with particular font applied, it works fine?

  • Right. It usually shows up right on my computer. But sometimes it shows wrong.

  • Could you share the link to playground with a single letter anyway?
    I would try it on my local...

  • @jan_blaha

    Hello, i found that character convert wrong. I convert from HTML UTF-8

    &nbsp become Â

  • any idea ?

  • The thing is that jsreport doesn't deal with fonts or pdf printing. Both are done by chrome which we have no influence on. So unfortunately I have no clue.

    If you are able to print a pdf with a single letter that is wrong like you mention and email it to me. I could take a look inside if I find out something.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.