Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

thin and PDFkit

#140

Not sure if this is a PDFkit or thin problem, but thin will not serve pdfs generated with PDFKit and it seems to hang up the thin serer.

This is what I posted on the PDFkit site issues, but I may have to go look for another tool since this one seems to gone into a "I don't care anymore state" (no updates in months or anyone looking at issues).

https://github.com/jdpace/PDFKit/issues#issue/57

I did find a post somewhere on the web that they could not get PDFkit to work with the Thin server. I searched the issues and saw no reference to thin - so I'll post an issue. It does not work, it just hangs up thin.

Trying various approaches and got a line in the thin.log

The switch --disable-smart-shrinking, is not support using unpatched qt, and will be ignored.The switch --print-media-type, is not support using unpatched qt, and will be ignored.

Than seems like more of a warning, but It just hangs the thin server and you have to kill it.

Don't know if this is an PDFKit issue or Thin issue

Reported by Steve Alex · November 24th, 2010 @ 06:27 AM

State: new
Milestone: none
Assigned to: macournoyer macournoyer

Activity

  1. Marc-André Cournoyer
    Marc-André Cournoyer

    Hey Steve, try w/ another webserver like webrick or mongrel to see if you can reproduce. If you can, issue is in PDFKit. Although, the warning message you got in the log leads me to think it's a PDFKit issue, maybe you can look at http://prawn.majesticseacreature.com/ ?

    November 24th, 2010 @ 02:35 PM

  2. Steve Alex
    Steve Alex

    I guess I should have read more carefully the other post where I found pdfkit was having problem with thin.

    http://xaop.com/blog/2010/08/04/deploying-rails-3-on-ruby-1-9-2/

    The main comment:

    We use PDFKit to generate PDF exports, and PDFKit doesn't work with Thin for some reason. Requests for PDF versions of a page seem to hang indefinitely. On our development machines, running Mac OS X, it seems to work if we start Thin in threaded mode, but on Ubuntu this makes things unpredictable and often extremely slow to the extent where it is beyond unusable.

    It seems to work with the --threaded switch.

    It does work with webrick, have not tried mongrel. In looking at the code (and I in no way a ruby guru), there is not much there, it just sets up calls to wkhtmltopdf using middleware to allow a .pdf respond_to. It is really a neat concept. I've used prawn and it is great, but this is so much easier for simple things.

    Guess you can close this and if someone else has a problem, just refer to threaded.

    Steve

    November 26th, 2010 @ 08:53 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.