Problem/Motivation

The PrintEngineInterface::getBlob() implementation in the TcPdfv1 PrintEngine plugin causes a PDF to be sent to the browser. The PrintEngine plugin is not passing parameters correctly to the tcpdf::Output() method.

The method signature for tcpdf::Output() is:

public function Output($name='doc.pdf', $dest='I') {

However the TcPdfv1::getBlob() method only passes one parameter ('S') to tcpdf::Output() so it is incorrectly interpreted as the $name param, and $dest is treated as the default value of 'I' (inline output).

Proposed resolution

Provide the $name parameter for tcpdf::Output($name, $dest) call. It will be ignored, per the method documentation, but will make the $dest be correctly understood as the 'S' (string output) option.

CommentFileSizeAuthor
#2 2916617-2.patch459 bytesandrewmacpherson

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Status: Active » Needs review
StatusFileSize
new459 bytes

One line patch fixes the tcpdf::Output() method call.

I haven't touched any tests.

andrewmacpherson’s picture

Update attribution, credit customer.

andrewmacpherson’s picture

Issue summary: View changes

benjy’s picture

Status: Needs review » Fixed

Thanks, committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.