Forum


Replies: 1   Views: 236
Customising the content-disposition when streaming a pdf using transformdocadvpdf
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by jwphp  · 09-07-2025 - 11:25

In https://www.phpdocx.com/en/forum/default/topic/2506#post_8941 I was advised of a patch to use to customise the Content-Disposition value when streaming a PDF using TransformDocAdvPDF. The response also said the same change would be included in the next stable release of phpdocx. I have just downloaded phpdocx 16.0 Premium and the change has not been included. Is this still going to be included at some point?

Summary of patch mentioned in previous topic posted by admin:

 

We have added support in the testing branch. Please edit TransformDocAdvPDF.php and replace the following line:

$this->pdf->stream();

with:

$this->pdf->stream($target);

After this change, the target value will be used in Content-Disposition. This same change will be included in the next stable release of phpdocx.