DocumentViewer not showing pdfs in Chrome

Community Driven Extensions Project
petter.nilsson
Posts: 8
Joined: 18 Aug 2021, 08:29

18 Aug 2021, 11:58

Hello

I've experienced some problems showing pdfs in the document view since a couple of weeks and since the last update of Chrome (before 92.0.4515.159).

It seams that there is something that is not correct in the pdfs becuase it only occures for certain files.

I have also tested this on the https://www.primefaces.org/showcase-ext ... /basic.jsf and also there, it shows up completely white.

I've found that by inactivating the css-property "color: transparent;" on the class .textLayer > div, at least the text on the document is shown.

I would like to upload som pictures but do not have access to a public server (If this can help, please let me know).

Kind regards
Petter Nilsson

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

19 Aug 2021, 16:50

hmmm I am using Chrome 92 and that Showcase PDF viewer is working fine for me?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

petter.nilsson
Posts: 8
Joined: 18 Aug 2021, 08:29

20 Aug 2021, 08:28

Ok, is there any way to debug the viewer with a document that is not working for us?

KR
Petter Nilsson

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

23 Aug 2021, 21:38

Is there any errors on the Chrome F12 console?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

petter.nilsson
Posts: 8
Joined: 18 Aug 2021, 08:29

24 Aug 2021, 11:47

Hello,

The only output I have in the console is the following:

PDF ee747583914e21aa0ed7e0e627ae68f3 [1.4 OCR Service / OmniPage CSDK 21] (PDF.js: 1.10.88) pdf.viewer.js.jsf:19893:15
Warning: getOperatorList - ignoring errors during task: RenderPageRequest: page 0 2 pdf.worker.js.jsf:1:855

Kind regrards
Petter Nilsson

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

25 Aug 2021, 14:01

PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

25 Aug 2021, 20:22

I just published a 10.0.5-SNAPSHOT build with the latest PDF.JS if you want to try that and see if it fixes your issue!

You just need to add this to your pom.xml to be able to get the SNAPSHOT.

Code: Select all

<repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshot Repository</name>
    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
        <enabled>false</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

gemmey
Posts: 1
Joined: 26 Aug 2021, 20:32
Contact:

26 Aug 2021, 20:45

if PDF files are not opening in chrome try this method I hope it will help to open your file in chrome. Check if 'Download PDF files instead of automatically opening them in Chrome' is turned on in Chrome. When this is enabled, all PDF will be downloaded instead of view. Near the bottom, click on PDF documents. Turn off Download PDF files instead of automatically opening them in Chrome.

petter.nilsson
Posts: 8
Joined: 18 Aug 2021, 08:29

27 Aug 2021, 13:21

Hello @Melloware

Yes, that was the error and runs perfect with the patch.

Thank you so much!

Kind regards
Petter Nilsson

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

27 Aug 2021, 18:32

Nice thanks for reporting back!
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests