/** * Get Quotation pdf * by Quotation number * @param integer $no * @return mixed */ public function pdf($no, $download = false) { $handle = $this->getHandle($no); $pdf = $this->client->Quotation_GetPdf(array('quotationHandle' => $handle))->Quotation_GetPdfResult; if ($download) { header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename="' . $no . '.pdf"'); echo $pdf; return true; } return $pdf; }