CRM-20420 - PDFLetterCommon - Record attachments (in mode "combined-attached")
authorTim Otten <totten@civicrm.org>
Thu, 13 Apr 2017 05:07:37 +0000 (22:07 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 13 Apr 2017 05:16:29 +0000 (22:16 -0700)
commit3c48a60caeb1694b78f483bf2db110ef5ea92668
tree467155949a37398f619942025078c2fa3fccdd57
parent63c8a9bac1696f2a0fe045e72902e22394409194
CRM-20420 - PDFLetterCommon - Record attachments (in mode "combined-attached")

If the setting `recordGeneratedLetters` is `combined-attached`, then we
should capture the content of the generated file and save it to an
attachment.

Note: There are several different ways generating files (eg HTML=>PDF,
HTML=>docx/ODT, or docx/ODT template file).  Ideally, these would support
common set of options for directing output (to a file, string, or console).
In fact, some do, and all the underlying libraries do...  but the
middle-logic only handles the console consistently.  We use output buffering
(ob_start()) to capture the content and save it to a file.
CRM/Contact/Form/Task/PDFLetterCommon.php