• PDF Preview unavailable on Docker installation

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #53598  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!
 #53601  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
 #53604  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 )
 #53606  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 2584 times
and
pdf_unavailable_config.png
pdf_unavailable_config.png (261.96 KiB) Viewed 2584 times
screens).
Also the pdf file
(12.18 KiB) Downloaded 120 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 2584 times
and
pdf_ok_config.png
pdf_ok_config.png (278.55 KiB) Viewed 2584 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
 #53609  by jllort
 
In your configuration what is the value of the configuration parameter named "system.previewer" ( Administration > configuration parameters )
 #53636  by jllort
 
I have flexpaper too, I attach some screenshots:
Selección_062.png
Selección_062.png (91.42 KiB) Viewed 2236 times
Be sure you have disabled the "Acrobat plugin preview"
Selección_063.png
Selección_063.png (61.24 KiB) Viewed 2236 times
 #53652  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!
 #53653  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.
 #53675  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,

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.