nextcloud / files_pdfviewer

:book: A PDF viewer for Nextcloud
GNU Affero General Public License v3.0
86 stars 43 forks source link

Fail to render Japanese fonts #873

Open hamano opened 9 months ago

hamano commented 9 months ago

Japanese pdf is not rendered nextcloud 28 clean installation. A blank page is displayed. The cause is that some static files, including the bcmap file, have not been retrieved.

The following files can be successfully retrieved without authentication. (apache responds 200)

The following file is not found.(apache responds 404)

I seem to have a problem with static file routing. Any advice on how to correct this would be appreciated.

sample pdf: https://hikaku.cman.jp/pdf/sample/pdf_font_none.pdf

Server configuration

Deployed dockerhub image 28-apache

List of activated apps:

default apps

Nextcloud configuration:

default

Client configuration

Browser: chrome, firefox It's not a browser matter. I confirmed 404 response with the curl command.

qibao07 commented 8 months ago

Chinese is not displayed either.

qibao07 commented 7 months ago
    location /apps/files_pdfviewer/js/pdfjs/web/cmaps {
        proxy_pass http://host.docker.internal:57208/github-mirror/files_pdfviewer/raw/branch/master/js/pdfjs/web/cmaps/;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    location / {
        proxy_pass http://host.docker.internal:57202/; # nextcloud server
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

"/apps/files_pdfviewer/js/pdfjs/web/cmaps/UniGB-UCS2-H.bcmap"

When the requested address can be accessed successfully, the problem is solved.

But this is only a temporary solution.