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