Skip to content

Commit

Permalink
Merge pull request #213 from cuali/tcpdf6
Browse files Browse the repository at this point in the history
Update to TCPDF 6.0.091 (2014-08-13)
  • Loading branch information
c-schmitz committed Sep 11, 2014
2 parents 1525327 + 60e4558 commit 0636970
Show file tree
Hide file tree
Showing 304 changed files with 28,852 additions and 60,163 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.settings
.project
/upload/surveys/*
/styles/gringegreen/images/Thumbs.db
Expand Down
12 changes: 3 additions & 9 deletions application/config/tcpdf.php
Expand Up @@ -97,15 +97,6 @@
$tcpdf['blank_image'] = $tcpdf['image_directory'].'_blank.png';


/************************************************************
* TCPDF language settings file
* ----------------------------------------------------------
* Directory and filename of the language settings file
***********************************************************/

$tcpdf['language_file'] = $tcpdf['base_directory'].'config'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'eng.php';



/***************************************************************************
* DOCUMENT CONFIGURATION PARAMETERS
Expand Down Expand Up @@ -205,6 +196,9 @@

$tcpdf['page_font'] = 'freemono';
$tcpdf['page_font_size'] = 9;
$tcpdf['data_font'] = 'freemono';
$tcpdf['data_font_size'] = 8;
$tcpdf['mono_font'] = 'freemono';

$tcpdf['small_font_ratio'] = 2/3;

Expand Down
69 changes: 31 additions & 38 deletions application/libraries/admin/pdf.php
Expand Up @@ -19,144 +19,144 @@
# include TCPDF
require(APPPATH.'config/tcpdf'.EXT);

require_once($tcpdf['base_directory'].'/tcpdf.php');


/**
* page format
*/
(!defined ('PDF_PAGE_FORMAT')) ? (define ('PDF_PAGE_FORMAT', 'A4')):'';
(!defined ('PDF_PAGE_FORMAT')) ? (define ('PDF_PAGE_FORMAT', isset($tcpdf['page_format']) ? $tcpdf['page_format'] : 'A4')):'';

/**
* page orientation (P=portrait, L=landscape)
*/
(!defined ('PDF_PAGE_ORIENTATION')) ? (define('PDF_PAGE_ORIENTATION', 'P')):'';
(!defined ('PDF_PAGE_ORIENTATION')) ? (define('PDF_PAGE_ORIENTATION', isset($tcpdf['page_orientation']) ? $tcpdf['page_orientation'] :'P')):'';

/**
* document creator
*/
(!defined ('PDF_CREATOR'))?(define ('PDF_CREATOR', 'TCPDF')):'';
(!defined ('PDF_CREATOR'))?(define ('PDF_CREATOR', isset($tcpdf['creator']) ? $tcpdf['creator'] : 'TCPDF')):'';

/**
* document author
*/
(!defined ('PDF_AUTHOR'))? (define ('PDF_AUTHOR', 'TCPDF')):'';
(!defined ('PDF_AUTHOR'))? (define ('PDF_AUTHOR', isset($tcpdf['author']) ? $tcpdf['author'] : 'TCPDF')):'';

/**
* header title
*/
(!defined ('PDF_HEADER_TITLE'))? (define ('PDF_HEADER_TITLE', 'TCPDF Example')):'';
(!defined ('PDF_HEADER_TITLE'))? (define ('PDF_HEADER_TITLE', isset($tcpdf['header_title']) ? $tcpdf['header_title'] : 'TCPDF Example')):'';

/**
* header description string
*/
(!defined ('PDF_HEADER_STRING'))? (define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org")):'';
(!defined ('PDF_HEADER_STRING'))? (define ('PDF_HEADER_STRING', isset($tcpdf['header_string']) ? $tcpdf['header_string'] : "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org")):'';

/**
* image logo
*/
(!defined ('PDF_HEADER_LOGO'))? (define ('PDF_HEADER_LOGO', 'tcpdf_logo.jpg')):'';
(!defined ('PDF_HEADER_LOGO'))? (define ('PDF_HEADER_LOGO', isset($tcpdf['header_logo']) ? $tcpdf['header_logo'] : 'tcpdf_logo.jpg')):'';

/**
* header logo image width [mm]
*/
(!defined ('PDF_HEADER_LOGO_WIDTH'))? (define ('PDF_HEADER_LOGO_WIDTH', 30)):'';
(!defined ('PDF_HEADER_LOGO_WIDTH'))? (define ('PDF_HEADER_LOGO_WIDTH', isset($tcpdf['header_logo_width']) ? $tcpdf['header_logo_width'] : 30)):'';

/**
* document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch]
*/
(!defined ('PDF_UNIT'))? (define ('PDF_UNIT', 'mm')):'';
(!defined ('PDF_UNIT'))? (define ('PDF_UNIT', isset($tcpdf['page_unit']) ? $tcpdf['page_unit'] : 'mm')):'';

/**
* header margin
*/
(!defined ('PDF_MARGIN_HEADER'))? (define ('PDF_MARGIN_HEADER', 5)):'';
(!defined ('PDF_MARGIN_HEADER'))? (define ('PDF_MARGIN_HEADER', isset($tcpdf['header_margin']) ? $tcpdf['header_margin'] : 5)):'';

/**
* footer margin
*/
(!defined ('PDF_MARGIN_FOOTER'))? (define ('PDF_MARGIN_FOOTER', 10)):'';
(!defined ('PDF_MARGIN_FOOTER'))? (define ('PDF_MARGIN_FOOTER', isset($tcpdf['footer_margin']) ? $tcpdf['footer_margin'] : 10)):'';

/**
* top margin
*/
(!defined ('PDF_MARGIN_TOP'))? (define ('PDF_MARGIN_TOP', 27)):'';
(!defined ('PDF_MARGIN_TOP'))? (define ('PDF_MARGIN_TOP', isset($tcpdf['margin_top']) ? $tcpdf['margin_top'] : 27)):'';

/**
* bottom margin
*/
(!defined ('PDF_MARGIN_BOTTOM'))? (define ('PDF_MARGIN_BOTTOM', 25)):'';
(!defined ('PDF_MARGIN_BOTTOM'))? (define ('PDF_MARGIN_BOTTOM', isset($tcpdf['margin_bottom']) ? $tcpdf['margin_bottom'] : 25)):'';

/**
* left margin
*/
(!defined ('PDF_MARGIN_LEFT'))? (define ('PDF_MARGIN_LEFT', 15)):'';
(!defined ('PDF_MARGIN_LEFT'))? (define ('PDF_MARGIN_LEFT', isset($tcpdf['margin_left']) ? $tcpdf['margin_left'] : 15)):'';

/**
* right margin
*/
(!defined ('PDF_MARGIN_RIGHT'))? (define ('PDF_MARGIN_RIGHT', 15)):'';
(!defined ('PDF_MARGIN_RIGHT'))? (define ('PDF_MARGIN_RIGHT', isset($tcpdf['margin_right']) ? $tcpdf['margin_right'] : 15)):'';

/**
* default main font name
*/
(!defined ('PDF_FONT_NAME_MAIN'))? (define ('PDF_FONT_NAME_MAIN', 'helvetica')):'';
(!defined ('PDF_FONT_NAME_MAIN'))? (define ('PDF_FONT_NAME_MAIN', isset($tcpdf['page_font']) ? $tcpdf['page_font'] : 'helvetica')):'';

/**
* default main font size
*/
(!defined ('PDF_FONT_SIZE_MAIN'))? (define ('PDF_FONT_SIZE_MAIN', 10)):'';
(!defined ('PDF_FONT_SIZE_MAIN'))? (define ('PDF_FONT_SIZE_MAIN', isset($tcpdf['page_font_size']) ? $tcpdf['page_font_size'] : 10)):'';

/**
* default data font name
*/
(!defined ('PDF_FONT_NAME_DATA'))? (define ('PDF_FONT_NAME_DATA', 'helvetica')):'';
(!defined ('PDF_FONT_NAME_DATA'))? (define ('PDF_FONT_NAME_DATA', isset($tcpdf['data_font']) ? $tcpdf['data_font'] : 'helvetica')):'';

/**
* default data font size
*/
(!defined ('PDF_FONT_SIZE_DATA'))? (define ('PDF_FONT_SIZE_DATA', 8)):'';
(!defined ('PDF_FONT_SIZE_DATA'))? (define ('PDF_FONT_SIZE_DATA', isset($tcpdf['data_font_size']) ? $tcpdf['data_font_size'] : 8)):'';

/**
* default monospaced font name
*/
(!defined ('PDF_FONT_MONOSPACED'))? (define ('PDF_FONT_MONOSPACED', 'courier')):'';
(!defined ('PDF_FONT_MONOSPACED'))? (define ('PDF_FONT_MONOSPACED', isset($tcpdf['mono_font']) ? $tcpdf['mono_font'] : 'courier')):'';

/**
* ratio used to adjust the conversion of pixels to user units
*/
(!defined ('PDF_IMAGE_SCALE_RATIO'))? (define ('PDF_IMAGE_SCALE_RATIO', 1.25)):'';
(!defined ('PDF_IMAGE_SCALE_RATIO'))? (define ('PDF_IMAGE_SCALE_RATIO', isset($tcpdf['image_scale']) ? $tcpdf['image_scale'] : 1.25)):'';

/**
* magnification factor for titles
*/
(!defined('HEAD_MAGNIFICATION'))? (define('HEAD_MAGNIFICATION', 1.1)):'';
(!defined('HEAD_MAGNIFICATION'))? (define('HEAD_MAGNIFICATION', 1.1)):''; // never used in TCPDF 6.

/**
* height of cell repect font height
*/
(!defined('K_CELL_HEIGHT_RATIO'))? (define('K_CELL_HEIGHT_RATIO', 1.25)):'';
(!defined('K_CELL_HEIGHT_RATIO'))? (define('K_CELL_HEIGHT_RATIO', isset($tcpdf['cell_height_ratio']) ? $tcpdf['cell_height_ratio'] : 1.25)):'';

/**
* title magnification respect main font size
*/
(!defined('K_TITLE_MAGNIFICATION'))? (define('K_TITLE_MAGNIFICATION', 1.3)):'';
(!defined('K_TITLE_MAGNIFICATION'))? (define('K_TITLE_MAGNIFICATION', 1.3)):''; // never used in TCPDF 6.

/**
* reduction factor for small font
*/
(!defined('K_SMALL_RATIO'))? (define('K_SMALL_RATIO', 2/3)):'';
(!defined('K_SMALL_RATIO'))? (define('K_SMALL_RATIO', isset ($tcpdf['small_font_ratio']) ? $tcpdf['small_font_ratio'] : 2/3)):'';

/**
* set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language
* set to true to enable the special procedure used to avoid the overlapping of symbols on Thai language
*/
(!defined('K_THAI_TOPCHARS'))? (define('K_THAI_TOPCHARS', true)):'';
(!defined('K_THAI_TOPCHARS'))? (define('K_THAI_TOPCHARS', isset($tcpdf['thai_top_chars']) ? $tcpdf['thai_top_chars'] : true)):'';

/**
* if true allows to call TCPDF methods using HTML syntax
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
*/
(!defined('K_TCPDF_CALLS_IN_HTML'))? (define('K_TCPDF_CALLS_IN_HTML', true)):'';
(!defined('K_TCPDF_CALLS_IN_HTML'))? (define('K_TCPDF_CALLS_IN_HTML', isset($tcpdf['tcpdf_in_html']) ? $tcpdf['tcpdf_in_html'] : true)):'';

require_once($tcpdf['base_directory'].'/tcpdf.php');


/************************************************************
* TCPDF - CodeIgniter Integration
Expand Down Expand Up @@ -237,13 +237,6 @@ function __construct() {
);


# language settings
if(is_file($this->_config['language_file'])) {
include($this->_config['language_file']);
$this->setLanguageArray($l);
unset($l);
}

# margin settings
$this->SetMargins($this->_config['margin_left'], $this->_config['margin_top'], $this->_config['margin_right']);

Expand Down
1 change: 0 additions & 1 deletion application/libraries/admin/quexmlpdf.php
Expand Up @@ -19,7 +19,6 @@
*/
require('pdf.php');
require_once($tcpdf['base_directory'].'/tcpdf.php');
require_once($tcpdf['base_directory'].'/config/lang/eng.php');

/**
* A TCPDF based class to produce queXF compatible questionnaire PDF files and banding description XML from queXML
Expand Down

0 comments on commit 0636970

Please sign in to comment.