HomeDeveloperHelpersdevelopment/rpage

development/rpage

Rpage Helper

Loading this Helper

$this->load->helper('development/rpage');

Available Functions:

1. function pdfCreate($html, $fileName, $stream = TRUE, $password = NULL)

Input Parameters:

      $html(string)- Html content which want to print in PDF
      $fileName(string)- Name of pdf
      $stream(string)- if TRUE then return content. if FALSE then it returns pdf file path as parameter
      $password(string)- Value for protect pdf

Output Parameters:

$response = array(
'success' => '1',
'temp_file_path' => "",
'content' => "",
);

      success(string)- Return 1 on successful else 0
      temp_file_path(string)- return file path where file is created on stream false condition
      content(string)- it return pdf content if input parameter “stream” is true

Sample Calling:

$content = "Pdf file is created at " . date(Ymdhis) . " and record id is ". $this->record_data . " and object_unique_id is ". $this->object_unique_id;
$response = pdfCreate($content, "sample", false, null);

Was this article helpful to you? Yes 1 No