Hello, I would like to use poppler on AWS' Lambda service.   Specifically this 
work flow: 
https://d0.awsstatic.com/Test%20Images/MasonTests/Lambda/Lambda_FileProcessing.png
 only instead of image processing it is PDF processing

However there are some limits involved: 
http://docs.aws.amazon.com/lambda/latest/dg/limits.html

* It only uses amzn-ami-hvm-2016.03.3.x86_64-gp2 (ami-6869aa05) to run the 
instance.  I cannot create an AMI of my own with poppler installed
* The total amount of code + binaries must be under 50mb
* You can also download files from s3 if your code/binaries are larger than 
50mb, but you are limited to a total of 512mb of disc space

I am trying to create a binary that is self contained with everything poppler 
(or specifically pdftoppm) needs to run but I am rather new to what all is 
involved.

Here is my configure:
[ec2-user@ip-10-0-2-96 poppler-bin-static]$ ./configure --enable-static 
--prefix /home/ec2-user/poppler-bin-static/

https://gist.github.com/chrisan/b028db22902c0768e72e05abb481208c#file-config_results

Then `make install` results in these files 
https://gist.github.com/chrisan/b028db22902c0768e72e05abb481208c#file-make_results

I then copy the folder that was created with make to a fresh AMI with no 
packages/libraries installed and attempt to run

[ec2-user@ip-10-0-2-186 ~]$ ./poppler-bin-static/bin/pdfinfo
./poppler-bin-static/bin/pdfinfo: error while loading shared libraries: 
libopenjpeg.so.2: cannot open shared object file: No such file or directory

This is where I'm stuck.

Is there a way to make the binary so it includes libopenjpeg.so.2 (and whatever 
else)?

Can I copy libopenjpeg.so.2 and tell pdftoppm where it lives?

If not, how would one create an executable pdftoppm that is self contained (or 
could be run by only copying files, NO install or compile)

Thank you for any assistance
-Chris
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to