Closed ekadin-mtc closed 9 months ago
Few things
Can you press f12 and right click refresh button and do refresh hard and cache
If that doesn't work can you also answer
Are you running with login function
Are you using nginx or similar?
And any logs in the f12 console
@Frooodle A hard refresh did not help. I was running with the login function, but I turned it off and still had the same issue. I didn't notice any issues in the F12 console.
I am running behind a Cloudflare tunnel.
It looks like view-pdf doesn't work properly if the SYSTEM_ROOTURIPATH
environment variable is set.
It's trying to load a couple files like pdf.js
, but tries to access from the root path. If system_rooturipath
is set to /pdf
, it should access the file from /pdf/pdfjs/pdf.js
but instead tries to access /pdfjs/pdf.js
which is resulting in a 404 error.
Something like RewriteRule ^/pdfjs/(.*?)$ /pdf/pdfjs/$1 [R]
should work as a quick fix in your reverse proxy config.
It's possible that my issue is unrelated, but perhaps it isn't. The whole page was refusing to load properly for me.
Thanks for the investigation on this I'll see what I can do on my end!
Thank you @mk-hs for your input. Unfortunately, that doesn't seem to be the issue in my case as I don't have the SYSTEM_ROOTURIPATH set (as far as I know). I don't know what the location of pdf.js is in my system (Kubernetes), but I do know that /pdfjs/pdf.worker.js is loading just fine.
I am making some changes to fix that rootpath issue Hoping we get lucky and it fixes your issue too
Hello, have you found an idea for the solution yet? Here the longlist of Problems, produced under Firefox by starting the app:
Layout-Darstellung wurde erzwungen, bevor die Seite vollständig geladen war. Falls Stylesheet noch nicht geladen sind, kann dies zu einem kurzzeitigen Darstellung des Inhalts ohne Formatierung führen. view-pdf
Die drawWindow-Methode von CanvasRenderingContext2D ist veraltet. Verwenden Sie stattdessen die Erweiterungs-API tabs.captureTab https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/tabs/captureTab pagedata-script.js:1:12509 PDF 289a576d8b729810b84600c76ce988b7 [1.7 LibreOffice 7.6 / Writer] (PDF.js: 3.11.174 [ce8716743]) app.js:1674:56 Warning: TT: undefined function: 21 pdf.worker.js:1019:13
Can you report back if you still have issues!
Can you report back if you still have issues!
I updated to 0.16.1 without changing anything else. Still having the same issues.
Weird another person raised same issue and said it was resolved
Same problem not solved for me yet. You can test it for yourself here: https://pdf.hub.s-w-w.com/view-pdf
Now im even more confused
What browser are you using, perhaps browser specific?
I'm having the issues across different browsers and computers. I tested in Edge, Chrome and Firefox. @Frooodle is your screenshot from @HagspielBu 's link?
Yes it's from that link How weird
You can also test it under iOS or Android. No difference in this behaviour. I analysed the logs of the docker-stack: No faults. I suppose, it is the JS-intpretor. Realy funny! If I find some time next days, I make an installation under Synology-Linux. Or is there anywhere a better docker-build?
It's not realy a great problem. You can import pictures with ".../add-image". But for the moment, there are some more difficults with performance (OCRmyPDF and Tesseract for OCR works really slow.) And the proggy still produce uncaught failiures.
One more problem is the bad workflow: The different functions are not integrated. To load the same file for every different operation is a little bit crazy. Perhaps an integration under Nextcloud would be a good idea? Good evening!
The tested with the three standards Chrome, Firefox and Edge under Windows 11 and Android.
PS1: On your screenshot I miss the buttons for import pictures and so on.
PS2: Is there perhaps a problem with the language (german)?
Tschau!
Burkard
Von: Anthony Stirling @.> Gesendet: Dienstag, 12. Dezember 2023 23:51 An: Frooodle/Stirling-PDF @.> Cc: HagspielBu @.>; Comment @.> Betreff: Re: [Frooodle/Stirling-PDF] Issues with view-pdf (Issue #468)
What browser are you using, perhaps browser specific?
— Reply to this email directly, view it on GitHub https://github.com/Frooodle/Stirling-PDF/issues/468#issuecomment-1852936732 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIXZBKLTGVSHDS5XOTKNFDYJDNUFAVCNFSM6AAAAAA7AISRBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSHEZTMNZTGI . You are receiving this because you commented. https://github.com/notifications/beacon/ALIXZBNUIAR5GHB6PYPJFGTYJDNUFA5CNFSM6AAAAAA7AISRBWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTOOGJBY.gif Message ID: @. @.> >
It looks like view-pdf doesn't work properly if the
SYSTEM_ROOTURIPATH
environment variable is set. It's trying to load a couple files likepdf.js
, but tries to access from the root path. Ifsystem_rooturipath
is set to/pdf/pdfjs/pdf.js
but instead tries to access/pdfjs/pdf.js
which is resulting in a 404 error.Something like
RewriteRule ^/pdfjs/(.*?)$ /pdf/pdfjs/$1 [R]
should work as a quick fix in your reverse proxy config.It's possible that my issue is unrelated, but perhaps it isn't. The whole page was refusing to load properly for me.
I'm having exactly this issue
I can confirm that this issue still persists, the rewrite rule is still necessary, otherwise:
GET https://server.url/pdfjs/pdf.worker.js Status 404 Not Found
although https://server.url/rooturl/pdfjs/pdf.worker.js
would be required.
The original issue seems to be unrelated though.
I too have the image shrinking issue - installed using the docker image using chrome, edge and safari on ios all showing the same behaviour
I'm struggling to debug the image resize bug. It appears to be a bug in Stirling-PDF itself - I've tried on a couple of public instances and they show the same behaviour.
Adding an image to the mozilla pdf.js example (https://mozilla.github.io/pdf.js/web/viewer.html) does not exhibit the same bug on the same browsers.
More testing. It appears to be an error caused by the inclusion of bootstrap.min.css
Removing that link reverts the page to its expected behaviour.
Discovering that shows that if the page overwrites the css as follows if fixes the problem:
* { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
I am having 2 issues with the view-pdf feature.
screenshot1
screenshot2