Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
k1llerk3ks opened this issue Nov 18, 2023 · 3 comments

Comments

@k1llerk3ks
Copy link

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;
        }
}

@PatWie
Copy link
Owner

PatWie commented Nov 20, 2023

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

const virtualScale = 3.0;

To say 1 or 5? I have to admit, that i am not a frontend-guy :-(

@k1llerk3ks
Copy link
Author

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?

@PatWie
Copy link
Owner

PatWie commented Dec 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants