Open penihel opened 5 years ago
We invested quite some time to add this extension as well but we failed. We were not able to make unoconv to run inside the docker image.
If you know how to run unoconv inside docker image, please let us know...
hi. @pofider . Sorry about that;
And... There is anohter solution to convert docx to pdf using jsreport?
You can run jsreport outside docker where unoconv should run.
or
You can use docker and use jsreport custom script afterRender hook and send the docx to an external service that can do docx-pdf conversion. It can be yours based on unoconv or one of the many public services.
Just out of curiosity, could you describe a bit your use case/why you need docx->pdf conversion?
So...
I use templater.info to process my docx templates.
Now, i need a service to convert the docx to pdf.
As I already use the "jsreport" to ohters HTML templates, I thought it was the shortest way, also using jsreport to convert docx to pdf.
It's a small project and I can't spend on a service charged just for that.
Check this https://github.com/zrrrzzt/docker-unoconv-webservice
Is a docker image running unoconv, with a webservice endpoint.
Looks like exactly what i need, but i dont try it yet.
You can get the project structure by runing jsreport init && jsreport configure
Try this on your docker file but it is about 1.5gb and ubuntu about 60MB docker image after build
FROM ubuntu:18.04
USER root
WORKDIR /home/app
RUN apt-get update && apt-get install -y unoconv
RUN apt-get install curl -y && curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
COPY package.json .
RUN npm install
COPY . .
EXPOSE 5488
CMD ["node", "server.js"]
We will review unoconv to be part of the official image again when we release v3 and update the os in the image.
the docker image jsreport/jsreport:2.6.1-full not includes this extention.
Its descriptions says:
jsreport/jsreport:2.6.1-full (Dockerfile) contains default installation plus all the community extensions including wkhtmltopdf or electron recipes
Notice the "all extentions". But is no true
Could you add this extention to the docker image?