Page 1 of 1

PDF Preview unavailable on Docker installation

PostPosted:Wed Jun 15, 2022 1:26 pm
by Kimbaras
Hi all,

First of all sorry if this is not the correct section.

I've just installed OpenKM 6.3.11 through Docker (using the latest image) and seems to be working for the most part.
I'm able to login, navigate, upload, download etc. yet the preview of PDF docs upload is unavailable...

Checked the logs and there are no errors reported in either catalina or openkm.log

Is something else required for the preview to be available on the docker setup?

Thanks!

Re: PDF Preview unavailable on Docker installation

PostPosted:Thu Jun 16, 2022 7:15 am
by Kimbaras
Think I resolved the issue...

So it seems the latest docker image is effectively missing some files / configs...

Basically I've confronted the docker installation with a different Tomcat installation I've previously done (which is working correctly) and in the config I've noticed the following config

system.swftools.pdf2swf

was NOT set on the Docker installation. So I've copied the "pdf2swf" executable file from the Tomcat installation (file provided by the bundle or the installer, can't remember) to the Docker container, updated the config from the Administration panel and puff the previews are working now.

So happy to have the issue resolved not happy as it seems the official docker image is missing a couple of things :?

Disclaimer: I've modified a little the docker-compose file by not using the docker MySQL (using a different DB server) and I'm using openkm/openkm-ce:latest instead of openkm/openkm-ce:6.3.9 as suggested by the docs.

Hope this helps someone and / or the devs to update the docker image

Re: PDF Preview unavailable on Docker installation

PostPosted:Fri Jun 17, 2022 4:43 am
by jllort
OpenKM it uses PDF.js to preview documents, with default configuration without changing anything in the configuration should preview PDF files by default. it is not required installing anything in docker to preview PDF files.

* Check what previewer do you have configured, if you changed revert to PDF.js again
* Can share a screenshot for better understanding ( if possible share a sample PDF here because I would like to test in our development environment )

Re: PDF Preview unavailable on Docker installation

PostPosted:Fri Jun 17, 2022 12:45 pm
by Kimbaras
Hey, thanks for the reply!

From what I see there is no preview, at least in the docker image I'm using (which is image: openkm/openkm-ce:latest in the docker-compose file).
Attached you'll find what I mean (see
pdf_unavailable.png
pdf_unavailable.png (146.54 KiB) Viewed 2807 times
and
pdf_unavailable_config.png
pdf_unavailable_config.png (261.96 KiB) Viewed 2807 times
screens).
Also the pdf file
(12.18 KiB) Downloaded 131 times
.

By the way, I don't think it's a file issue as I had the same behaviour with the attached test file as well with different PDFs.
If you think it is a file issue (and I'd be curious if that's the case) I'll upload also the one correctly previewing in the following screens.

Here is one of the working container I got to work and as you can see in the
pdf_preview_ok.png
pdf_preview_ok.png (1020.51 KiB) Viewed 2807 times
and
pdf_ok_config.png
pdf_ok_config.png (278.55 KiB) Viewed 2807 times
screens.

From what I can tell, after setting the "swftools.pdf2swf" config (as it was pre-configured in a bundled Tomcat or through the installer) it started to work.

Let me know if you need more details.

EDIT: forgot to mention, the screens with the issue are from a newly deployed container, so nothing did on that one (deployed the container, set the correct config to the DB and login) so that is "as-standard-as-possible" situation.

Thanks

Re: PDF Preview unavailable on Docker installation

PostPosted:Sun Jun 19, 2022 4:37 pm
by jllort
In your configuration what is the value of the configuration parameter named "system.previewer" ( Administration > configuration parameters )

Re: PDF Preview unavailable on Docker installation

PostPosted:Tue Jun 21, 2022 7:27 pm
by Kimbaras
It's currently set as "flexpaper" which is the default. I did not touch that setting.

Thanks,

Re: PDF Preview unavailable on Docker installation

PostPosted:Tue Jun 28, 2022 7:33 am
by jllort
I have flexpaper too, I attach some screenshots:
Selección_062.png
Selección_062.png (91.42 KiB) Viewed 2459 times
Be sure you have disabled the "Acrobat plugin preview"
Selección_063.png
Selección_063.png (61.24 KiB) Viewed 2459 times

Re: PDF Preview unavailable on Docker installation

PostPosted:Sun Jul 03, 2022 10:47 am
by Kimbaras
Uhm actually I got a black background...

Regarding the "Adobe plugin preview", could you please point me to that screen?
I can't seem to find it (or simply don't kown how to get to it).

Thanks!

Re: PDF Preview unavailable on Docker installation

PostPosted:Sun Jul 03, 2022 10:24 pm
by LauryMenton
Mmm, I will keep an eye on it. Some similiar threads have been discussed time ago about the same issue on 6.3.9, 6.3.11 builds.

For me, at least (without applying the fixes that were commented here), the PDFs that fail to be shown are the ones that are generated from scanned documents. The ones generated from Words, or any other similar sources works as expected in 95% of the times.

Re: PDF Preview unavailable on Docker installation

PostPosted:Mon Jul 04, 2022 8:16 am
by jllort
I attach new screenshot with red
Selección_088.png
Selección_088.png (59.33 KiB) Viewed 2397 times
square

Re: PDF Preview unavailable on Docker installation

PostPosted:Mon Jul 04, 2022 9:29 am
by LauryMenton
I already had that option disabled in my instance.

Re: PDF Preview unavailable on Docker installation

PostPosted:Tue Jul 05, 2022 8:48 pm
by Kimbaras
Sorry, wasn't totally clear in my last reply...

I don't kwon how to get to that screen.
What I mean is: where should I go / which button should I press?

I'd image it would be somewhere in the Administration (Configuration? Utilities?) tab but can't seem to find it...

Thanks,

Re: PDF Preview unavailable on Docker installation

PostPosted:Sun Jul 10, 2022 4:50 pm
by jllort
Must go at Administration > Profiles ( in the main menu just at the right of the user menu option )