Only Google viewer and Direct embed works. How to fix other two?

Created on 14 January 2021, over 3 years ago
Updated 11 March 2023, over 1 year ago

Problem/Motivation

I am pretty sure I am doing something wrong or I do not know. But only Google viewer and Direct embed works for me.

But the problems are following:
Google viewer:
Works, but only 50 percent of time. Sometimes it just does not load the file and nothing is rendered. No error is in console at all. But I googled a little bit and it looks like this is somehow standard behaviour of google viewer. Thats actually why I was looking for something else.

Direct embed:
Comes with a struggle of older browsers. I doubt explorer (I know) will be able to read that. And each browser has its own reader so it is not consistent. But I am using this one now. Since it is stable.

MS viewer:
Says it can not find the file. I tried tinkering with permissions because I thought it has to do something with permissions but nope. I can not get this one working at all.

pdf.js:
Says this error:

Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
    at HTMLIFrameElement.set 

I have no idea how to fix it.

Any idea how to fix the other two? I do not certainly need all of them, but I was thinking any viewer with consistent UI (so not browser dependent) and backwards compatibility (I guess JS library would do the job) will work. Also I wanted it to have fullscreen mode, not sure if MS viewer or pdf.js has it, maybe? Because direct embed can not be fullscreened - I guess because it is iframe.

πŸ’¬ Support request
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia lubwn

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    pdf.js supports full screen.

    About the error you mention with pdf.js, might be an issue with the pdf file itself. Feel free to upload it (if you are allowed to) for verifying it, but I cannot reproduce this otherwise.

Production build 0.71.5 2024