Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated pdftk version? #1

Open
StevenHarlow opened this issue Mar 13, 2014 · 11 comments
Open

Updated pdftk version? #1

StevenHarlow opened this issue Mar 13, 2014 · 11 comments

Comments

@StevenHarlow
Copy link

Hi Millie, Do you have the updated pdftk versions? There are a number of bug fixes for certain pdfs, as well as the ability to use multi-letter handles for referencing in the versions since these binaries. I'm running into issues where pdftk works on my dev machine but not in heroku, due to the differences in versions. I can go through the legwork of installing the binaries myself, but wanted to check if you had them already (or if not, and I do the legwork, if you'd like a pull request)

@forrestblount
Copy link

I'm running into a need for this too and having a hard time getting these binaries to build for Heroku. Did you get that far @StevenHarlow? Or can you point me in the right direction?

Here's what I've tried most recently:

Any ideas would be greatly appreciated.

@jonathan-mui
Copy link

@forrestblount: @StevenHarlow worked with me on this but we didn't get to upgrading it. I'm still curious about how to upgrade. This binary works, but I'm unclear on how @millie build it.

@SirRawlins
Copy link
Owner

+1 on this. I'm having issues where PDFtk is hanging with certain PDFs and locking the CPU at 100% and I'd like to run the latest build of PDFtk in order to eliminate that as the culprit.

@millie are you able to step in with any advice on the compile process you used for your original version?

@SirRawlins
Copy link
Owner

As a slight side-note which may be of interest, I've just been reading this blog post about compiling PDFx for Heroku stack. http://theprogrammingbutler.com/blog/archives/2011/07/28/running-pdftotext-on-heroku/

Also mentioned is this blog post is the PDFx gem which compiles the bin from source at runtime - something which we may well be able to utilise here. https://github.com/josh/ruby-xpdf

@SirRawlins
Copy link
Owner

@forrestblount I've been looking at the Makefiles trying to figure out which is likely to be our best chance of running.

As I understand it Heroku Cedar runs on Ubuntu, for which there are pre-compiled apt packages of PDFtk. Looking at the details of those they're derived from the Debian build. http://packages.ubuntu.com/source/lucid/pdftk

This would push me towards the Debian makefile being our best choice, however as you state it throws various errors about build dependencies when you try to run it.

@jonathan-mui
Copy link

I did some initial research on compiling binaries on Heroku. Here was one I found on how to reliably build binaries on Heroku http://www.higherorderheroku.com/articles/using-vulcan-to-build-binary-dependencies-on-heroku/. Haven't followed through with it yet.

@millie
Copy link
Collaborator

millie commented Sep 17, 2014

Sorry I can't be much help here. I built this in late 2012 using one of the then-current tutorials for how to create a custom buildpack (using vulcan) on Heroku. I've since abandoned the related project so am not planning on maintaining this library.

@SirRawlins
Copy link
Owner

@jonathan-mui thanks for the article - I'll work my way through this today and see how much progress I make.

@millie good to know you used Vulcan as that's exactly whats suggested in the article that Jon just linked. If we make good progress would you be interested in transferring ownership of the lib over to someone else so we can take it forward?

@SirRawlins
Copy link
Owner

I'm now in a position whereby I have PDFtk 2.0.2 running Heroku.

This took quite a few hours of research and playing around but for the moment at least it all looks to be working quite nicely, and my previous woes of 100% CPU utilisation are gone.

The process involved using a pre-built 2.0.2 version which had been compiled for Ubuntu (used for heroku) because compiling a custom Heroku build was proving too difficult.

I then ran into some issues with available dependancies on the Heroku stack, and needed to upgrade the Cedar stack to the new beta which is running the latest Ubuntu build.

@millie I would be happy to take ownership of this project if you'd like it taken off your hands?

@forrestblount
Copy link

Apologies for not posting sooner, I've been traveling this week. I've forked your pdftk-source and added a binary for 2.02 that's been working for me in production since July. Haven't seen any cpu spikes. We needed to move to 2.02 specifically for the ability to compile more than 26 separate pdfs and I've had no issues with that or any of our other (fairly vanilla) usage since then.

@SirRawlins
Copy link
Owner

@forrestblount thanks very much for the PR. I'll review it as soon as I get chance and look to get that merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants