CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Print PDF Letter limits for large PDFs
Pages: [1]

Author Topic: Print PDF Letter limits for large PDFs  (Read 656 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Print PDF Letter limits for large PDFs
January 21, 2012, 09:40:48 am
When using the batch action "Print PDF Letter",  it seems to hit a wall at around 50-60 contacts being targeted.   The request either times out, or creates a PDF with only the first 30 pages or so.

I would like to be able to use the "Print PDF Letter" for situations where there may be  over 900 or 1000 contacts, each contact getting a 3 page letter.   I am researching options to make this work.

Option a) Add tons of memory to the server. (The server already has already had a lot of memory added to it, and this did not solve the issue.)

Option b) Reconfigure the PDF processing to be less memory-intensive. Perhaps by creating the PDF in the background on the filesystem, then streaming the PDF to the user when its ready.   This could be configurable, based on how many pages are in the document. For example, for PDF's that are less than 10 pages use the current approach. For anything larger, create it on the filesystem  then stream the results to the user.


Any thoughts on this? Other possible approaches?


Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Print PDF Letter limits for large PDFs
January 21, 2012, 10:17:53 am

I think for large jobs like:

* import
* mass merge
* mail to multiple people (outside of civicrm)
* print pdf

We need to implement a "drupal7 queue" like framework to process smaller adjustable chunks at a time. We just hacked this in for mass-merge in 4.2 since it was a quick project (and there was not enough funding / hours to do a good extensible interface)

The print pdf is slightly different since it generates one PDF document for the entire set. I would probably restructure / add another task, which outputs this pdf to disk (and then it can be downloaded). Also this will enable the process to do and process a chunk of contacts (say 10-25 or so), write that PDF to disk as fileA and go onto the next set as fileB etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Print PDF Letter limits for large PDFs

This forum was archived on 2017-11-26.