digitalmusicstand icon indicating copy to clipboard operation
digitalmusicstand copied to clipboard

I still experience Blurry Pdfs behind nginx reverse proxy in Firefox and Chromium

Open k1llerk3ks opened this issue 1 year ago • 3 comments

Hey, hope you still maintain your (really!) amazing project, i love it!

I do have issues with clear pdf quality though. If i open (only some apparently?) sheets with Chromium or Firefox i get pdf quality of below. image

I retested it in Google Chrome, which worked well. digitalmusicstand is running behind a nginx reverse proxy. In Google Chrome it works well by directly calling IP:Port and through nginx. With Firefox and Chromium i have experienced issues only with the reverse proxy. I did not find a solution for my issue yet. Maybe i find any help here sooner or later.

Any Help appreciated!!

This is my nginx config:

server {

    server_name mydomain.com;

    listen 443 ssl;
    listen [::]:443 ssl;

    include /etc/nginx/includes/ssl.conf;

    ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot

    location / {
        proxy_pass http://127.0.0.1:3003;
        proxy_set_header Host $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;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
        }
}

k1llerk3ks avatar Nov 18 '23 21:11 k1llerk3ks

Hey there,

can you share your resolution of the monitor. It is currently a hack as I set the PDF higher than usual and resize it in the canvas. Could you share what happens if you set the value of https://github.com/PatWie/digitalmusicstand/blob/2e4a90c479342006d676562562118dd4791c00ff/static/js/main.js#L238 To say 1 or 5? I have to admit, that i am not a frontend-guy :-(

PatWie avatar Nov 20 '23 21:11 PatWie

Heyhey, thank you for your fast answer and help! My monitor is default Full HD 1920x1080. I've now experienced issues, when resizing inside the browser. When resized e.g. +200% it gets the effect of my issue. at 100% i am fine. same effect with reverse proxy and without.

I tested other values with the line of your suggestion, but that did not change anything. of course i built everything new after each change.

I now understand this is about showing the correct size of each pdf file. I do have another issue with a self created (probably too big) pdf, which is only shown partly, because it's plainly too big. If i resize the screen it's better ,but not correct. I assume the goal is to show any size of pdf in the best available quality, right? Do you want me to create another issue for it, or just use this one for both?

k1llerk3ks avatar Nov 24 '23 16:11 k1llerk3ks

I usually reload the webpage when resizing the window. But I never used zooming.

My goal is to somehow display the PDF (ideally in best quality, yes). But I am lacking knowledge here and I am honestly happy to have current state already somehow usable.

I keep this issue open as it certainly is an issue. Maybe some javascript pro with much more knowledge knows what is going on.

PatWie avatar Dec 02 '23 17:12 PatWie