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.

PDF generation isn't working

#16

Attendance reports no longer generate usable PDF files, at least to Safari. Perhaps a Prawn upgrade will fix this.

Reported by Marnen Laibow-Koser · March 9th, 2009 @ 10:43 PM

State: resolved
Milestone: none
Assigned to: Marnen Laibow-Koser Marnen Laibow-Koser

Activity

  1. Marnen Laibow-Koser
    Marnen Laibow-Koser
    • State changed from new to open

    Investigating.

    March 12th, 2009 @ 01:09 PM

  2. Marnen Laibow-Koser
    Marnen Laibow-Koser

    This appears to be caused by the split of Prawn into prawn and prawn-layout; the latter contained the table routines. However, the version of the Prawnto plugin we were using didn't know about Prawn layout, so I upgraded Prawnto.

    That created another problem: current Prawnto has some Rails-2.2-specific stuff. I followed the patch in http://prawn.lighthouseapp.com/p... ; that should be removed when we go to Rails 2.2, but it will not do any harm.

    March 12th, 2009 @ 01:43 PM

  3. Marnen Laibow-Koser
    Marnen Laibow-Koser

    That solved the problem on the local dev machine, but not on the production server. There's gotta be more going on, possibly to do with the Search model.

    March 12th, 2009 @ 01:50 PM

  4. Marnen Laibow-Koser
    Marnen Laibow-Koser

    (from [26ed61c329d60e886aa17c0c636d1f71da16fed3]) Upgrade prawnto plugin and require both prawn and prawn-layout gems. [#16 PDF generation isn't working] http://github.com/marnen/quorum2...

    March 15th, 2009 @ 12:16 AM

  5. Marnen Laibow-Koser
    Marnen Laibow-Koser

    (from [331855de6ae254bcd7e0153f70d82672abe792a9]) Remove Prawnto from submodule status. [#16 PDF generation isn't working] http://github.com/marnen/quorum2...

    March 15th, 2009 @ 12:16 AM

  6. Marnen Laibow-Koser
    Marnen Laibow-Koser

    (from [0c7a607e7551664a9f9485592f921058455be9e6]) Add Prawnto so we can patch it to work with Rails 2.1 (see http://prawn.lighthouseapp.com/p... ) [#16 PDF generation isn't working] http://github.com/marnen/quorum2...

    March 15th, 2009 @ 12:16 AM

  7. Marnen Laibow-Koser
    Marnen Laibow-Koser

    (from [56b24822c5ec2cd4098be3097798a6aba1e6eda5]) Use a less intractable sorting algorithm. Oddly enough, this seems to be partly related to the PDF bug. [#16 PDF generation isn't working] http://github.com/marnen/quorum2...

    March 15th, 2009 @ 12:16 AM

  8. Marnen Laibow-Koser
    Marnen Laibow-Koser

    (from [dc838f12be4750c45e52fa86e74032405566c4a0]) Update PDF code for Prawn 0.4.0. [#16 PDF generation isn't working] http://github.com/marnen/quorum2...

    March 15th, 2009 @ 01:02 AM

  9. Marnen Laibow-Koser
    Marnen Laibow-Koser
    • State changed from open to resolved

    Turns out there were a couple of interacting bugs.

    • There was a Permission record that somehow referred to a null User, which gave the PDF generation code conniption fits. I don't know how that could have happened, but I deleted it from the DB. (The sort routine changed in commit 56b24822c5ec2cd4098be3097798a6aba1e6eda5 was a red herring.)

    • Prawn 0.4.0 changed the API on Font#size and Font#height_of.

    Fixed in beta 2.9.2. The PDF file is still pretty ugly, but at least it works.

    March 15th, 2009 @ 01:03 AM

  10. Marnen Laibow-Koser
    Marnen Laibow-Koser

    See #25 Remove Prawn patch for Rails 2.1 regarding removal of Prawn patch now that we're off Rails 2.1.

    May 29th, 2009 @ 02:19 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.