Forum


Replies: 1   Views: 35
Customising the content-disposition when streaming a pdf using transformdocadvpdf

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.

Posted by admin  · 09-07-2025 - 14:22

Hello,

Thanks for your feedback.

Our apologies. We assure you that the next stable release will include that change. Please apply the same change in the current stable release of phpdocx to use it.

Regards.