Skip to content

Commit

Permalink
Updates to release v1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Oct 13, 2018
1 parent ca14256 commit 53a58d0
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log: `yii2-export`
=========================

## version 1.3.6

**Date:** 13-Oct-2018

- Enhance `ExportWriterPdf` to allow custom formatting

## version 1.3.5

**Date:** 13-Oct-2018
Expand Down
2 changes: 1 addition & 1 deletion src/ExportColumnAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2015 - 2018
* @package yii2-export
* @version 1.3.5
* @version 1.3.6
*/

namespace kartik\export;
Expand Down
4 changes: 2 additions & 2 deletions src/ExportMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*/

namespace kartik\export;
Expand Down Expand Up @@ -272,7 +272,7 @@ class ExportMenu extends GridView
public $noExportColumns = [];

/**
* @var string the view file for rendering the export form. DEPRECATED since v1.3.4 (not parsed or used anymore).
* @var string the view file for rendering the export form. DEPRECATED since v1.3.5 (not parsed or used anymore).
*/
public $exportFormView = '_form';

Expand Down
2 changes: 1 addition & 1 deletion src/ExportMenuAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @package yii2-export
* @version 1.3.5
* @version 1.3.6
*/

namespace kartik\export;
Expand Down
17 changes: 6 additions & 11 deletions src/ExportWriterPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @package yii2-export
* @version 1.3.5
* @version 1.3.6
*/

namespace kartik\export;
Expand Down Expand Up @@ -48,13 +48,14 @@ protected function createExternalWriterInstance($config = [])
*
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
* @throws PhpSpreadsheetException
* @throws \yii\base\InvalidConfigException
*/
public function save($pFilename)
{
$fileHandle = parent::prepareForSave($pFilename);

// Default PDF paper size
$paperSize = 'LETTER'; // Letter (8.5"x11")
$paperSize = Pdf::FORMAT_A4;

// Check for paper size and page orientation
if (null === $this->getSheetIndex()) {
Expand Down Expand Up @@ -89,25 +90,19 @@ public function save($pFilename)

// Create PDF
$pdf = $this->createExternalWriterInstance([
'format' => $paperSize,
'orientation' => $orientation,
'methods' => [
'SetTitle' => $properties->getTitle(),
'SetAuthor' => $properties->getCreator(),
'SetSubject' => $properties->getSubject(),
'SetKeywords' => $properties->getKeywords(),
'SetCreator' => $properties->getCreator(),
'SetCreator' => $properties->getCreator()
],
]);
$ortmp = $orientation;
$lib = $pdf->getApi();
/** @noinspection PhpUndefinedMethodInspection */
$lib->_setPageSize(strtoupper($paperSize), $ortmp);
$lib->DefOrientation = $orientation;
/** @noinspection PhpUndefinedMethodInspection */
$lib->AddPage($orientation);
$content = $this->generateHTMLHeader(false) . $this->generateSheetData() . $this->generateHTMLFooter();
// Write to file
fwrite($fileHandle, $pdf->Output(static::cleanHTML($content), $this->filename, Pdf::DEST_STRING));
fwrite($fileHandle, $pdf->output(static::cleanHTML($content), $this->filename, Pdf::DEST_STRING));
parent::restoreStateAfterSave($fileHandle);
}

Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/kv-export-columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Columns Selector Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/kv-export-columns.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Columns Selector Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/kv-export-columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Columns Selector Validation Module.
*
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/kv-export-columns.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Columns Selector Validation Module.
*
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/kv-export-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Data Validation Module.
*
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/kv-export-data.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/views/_columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Column Selector View
*
Expand Down
2 changes: 1 addition & 1 deletion src/views/_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2018
* @version 1.3.5
* @version 1.3.6
*
* Export Submission View
*
Expand Down

0 comments on commit 53a58d0

Please sign in to comment.