File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -593,14 +593,21 @@ public function saveAs($name)
593
593
* streamed inline.
594
594
* @param bool $inline whether to force inline display of the PDF, even if
595
595
* filename is present.
596
+ * @param array $headers a list of additional HTTP headers to send in the
597
+ * response as an array. The array keys are the header names like
598
+ * 'Cache-Control' and the array values the header value strings to send.
599
+ * Each array value can also be another array of strings if the same header
600
+ * should be sent multiple times. This can also be used to override
601
+ * automatically created headers like 'Expires' or 'Content-Length'. To suppress
602
+ * automatically created headers, `false` can also be used as header value.
596
603
* @return bool whether PDF was created successfully
597
604
*/
598
- public function send ($ filename = null , $ inline = false )
605
+ public function send ($ filename = null , $ inline = false , $ headers = array () )
599
606
{
600
607
if (!$ this ->getCommand ()->getExecuted () && !$ this ->execute ()) {
601
608
return false ;
602
609
}
603
- $ this ->getTmpFile ()->send ($ filename , $ this ->_tmpOutputContentType , $ inline );
610
+ $ this ->getTmpFile ()->send ($ filename , $ this ->_tmpOutputContentType , $ inline, $ headers );
604
611
return true ;
605
612
}
606
613
You can’t perform that action at this time.
0 commit comments