07-18-2017 03:34 AM
Hi all,
the release notes for 201707GA of the community edition mention the carve-out of GhostScript and introduction of alfresco-pdf-renderer as a wrapper for PDFium. Installing the new packages as an update on my Tomcat installation on Linux I receive the following error in my log:
ERROR [org.alfresco.repo.content.transform.pdfrenderer.AlfrescoPdfRendererContentTransformerWorker] [http-apr-8080-exec-33] Alfresco-PDF-Renderer is not available for transformations.
Execution result:
os: Linux
command: ./alfresco-pdf-renderer --version
succeeded: false
exit code: 1
out:
err: Cannot run program "./alfresco-pdf-renderer": error=2, No such file or directory
I downloaded the linux edition of alfresco-pdf-renderer directly from the maven repository, but do not know how to integrate it. At least adding the two lines
alfresco-pdf-renderer.root=/usr/local/bin
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer
to my alfresco-global-properties did not change a thing.
I also wonder if I need to provide pdfium somehow. Any help is much appreciated.
Best regards
Johannes
07-18-2017 05:48 AM
Hi:
I just installed the linux bundle and I can see the alfresco-pdf-renderer in common directory:
cesar@lemmy $ /opt/alfresco52g/common/alfresco-pdf-renderer/alfresco-pdf-renderer -h
Usage: alfresco_pdfium_convert [OPTION] [PDF-FILE] [PNG-FILE]
--width=<width> - override page width in pixels
--height=<height> - override page height in pixels
--maintain-aspect-ratio - Maintain aspect ratio when resizing the page
--allow-enlargement - When maintaining the aspect ratio, allow one parameter to exceed the given height/width
--page=<number> - 0-based page number to be converted (default 0)
--version - Display version information and exit immediately
And in alfresco-global.properties you should have something like the following (this is the default config):
alfresco-pdf-renderer.root=/opt/alfresco52g/common/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer
Regards.
--C.
07-18-2017 05:48 AM
Hi:
I just installed the linux bundle and I can see the alfresco-pdf-renderer in common directory:
cesar@lemmy $ /opt/alfresco52g/common/alfresco-pdf-renderer/alfresco-pdf-renderer -h
Usage: alfresco_pdfium_convert [OPTION] [PDF-FILE] [PNG-FILE]
--width=<width> - override page width in pixels
--height=<height> - override page height in pixels
--maintain-aspect-ratio - Maintain aspect ratio when resizing the page
--allow-enlargement - When maintaining the aspect ratio, allow one parameter to exceed the given height/width
--page=<number> - 0-based page number to be converted (default 0)
--version - Display version information and exit immediately
And in alfresco-global.properties you should have something like the following (this is the default config):
alfresco-pdf-renderer.root=/opt/alfresco52g/common/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer
Regards.
--C.
10-29-2017 06:21 PM
For those of us who run non-standard OS (eg: FreeBSD) which doesn't have PDFium available, I've coded up a python wrapper for image magick (which in turn uses ghostscript (I believe from docs) - both still available on FreeBSD).
Alpha code but it works.
See here for details:
Simply drop into the same folder - typically ${alfresco_home}/common/alfresco-pdf-renderer
Then update alfresco-global.properties as below:
alfresco-pdf-renderer.root=/opt/alfresco-community/common/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer.py
Remember to enable access by the alfresco user (chown alfresco ....) enable execution on unix (chmod 0500 ...) and update the filename appropriately - note the .py extension here.
Options currently Unimplemented:
--allow-enlargement - to do when time permits
--maintain-aspect-ratio - this appears to "Just Work" at this time
05-21-2018 06:48 AM
The latest packaging of the docker images will describe the software that is needed.
acs-community-packaging/Dockerfile at master · Alfresco/acs-community-packaging · GitHub
Explore our Alfresco products with the links below. Use labels to filter content by product module.