3

I am trying to run pdftk on an Elastic Beanstalk. The first problem I run into is that I cannot install pdftk on an instance of a Amazon Linux AMI because one of the dependencies (gcj) is not supported.

One of the options I am looking at is creating my own AMI and using that for my Elastic Beanstalk. Amazon recommends not doing this, and there are no community images for EB and Ubuntu.

Another option is using Docker. I am not as familiar with Docker, but I think I would be able to install pdftk in a container and then deploy that to EB. I am using Codeship for deployments and it looks like they have some options for Docker. (This is the options I'm currently exploring)

The last option I can think of is writing a library for encrypting pdfs on my own. I had a look at the encryption specifications for pdfs and I think this is not a time efficient option.

Has any one had a similar problem and found a good solution to the problem?


UPDATE:

After some more research I discovered that the issue was not with Amazon Linux bug with Fedora. Fedora dropped gcj because there was a lack of maintainers on the project, then dropped pdftk because it depends on gcj.

If you need another pdf tool kit I have found podofo to be a good replacement for what I've needed.

BBS
  • 1,351
  • 2
  • 12
  • 27

2 Answers2

1

First I apologise for resurrecting an old thread! Recently we wanted to create an Elastic Beanstalk worker environment that uses pdftk. Of course we also stumbled on the same issue, so this is what we did and it works for us so far. I hope it'll work for others too.

In the .ebextensions folder add the linked configs:

The needed LaTeX packages:

packages.config

You'll also need to add the el5 library in order to install libgcj.

01_el5_yum.config

Next add this config with the commands to install libgcj, pdftk and pdfjam

02_pdftk.config

And that should be it.

0

In case anyone comes here having problems with pdftk - poppler-utils also cover some tasks done by pdftk (in my case it was pdf splitting) and can be easily set up on an EB instance through .ebextensions:

packages:
  yum:
    poppler-utils: []
dadasign
  • 408
  • 4
  • 7