* @access public
*/
function display() {
- if ($this->getRowCount()) {
- $this->_agregarContenido();
-
- //Agrego los encabezados
- $t = true;
- foreach ($this->_pdf->getPages() as $page) {
- $this->_pdf->_pagina_actual = $page;
- $this->buildPage($t, $t);
- $t = false;
- }
- //}}}
- }
- else {
- $this->_pdf->newPage($this->_tamanio);
- $this->_pdf->addText($this->_config['Xi'],
- $this->_config['contenido']['Y'],
- 'No hay contenido para mostrar.',
- $this->_config['contenido']);
- $this->buildPage();
+ $this->_agregarContenido();
+
+ //Agrego los encabezados
+ $t = true;
+ foreach ($this->_pdf->getPages() as $page) {
+ $this->_pdf->_pagina_actual = $page;
+ $this->buildPage($t, $t);
+ $t = false;
}
+
$this->_pdf->display();
}
* @access protected
*/
function _obtenerAnchoColumnas() {
- $ancho_pagina = abs($this->_config['Xf'] -
- $this->_config['Xi']) ;
+ $ancho_pagina = $this->_pdf->getWidth($this->_orientacion);
for ($i=0; $i<$this->getColCount(); $i++ ) {
$tmp = $this->getCellAttributes(0,$i);
if (is_null(@$tmp['width'])) {
$attr[$i] = intval($tmp['width']);
}
$tmp = array_sum($attr);
- $attr2[0] = $this->_config['Xi'];
+ $attr2[0] = 0;
for ($i=1; $i<count($attr); $i++) {
$attr2[$i] = intval(($ancho_pagina * $attr[$i-1] / $tmp) +
$attr2[$i-1]);
}
- $attr2[$i] = $this->_config['Xf'];
+ $attr2[$i] = $ancho_pagina;
return $attr2;
}
}
}
- if ($alto < $this->_config['Yi']) {
+ if ($alto < 0) {
$this->_pdf->newPage($this->_tamanio);
$alto = $this->_getAvailableSpace($this->_pdf->numPage());
$alto -= $repetir[$ii]['max'];
for ($jj = 0; $jj < $this->getColCount(); $jj++) {
$estilo = $this->_obtenerEstiloCelda($ii, $jj);
- $this->_pdf->addRectangle($alto, $attr2[$jj],
- $alto+$repetir[$ii]['max'],
- $attr2[$jj+1], @$estilo['fill']);
+ $this->_pdf->addRectangle($attr2[$jj], $alto,
+ $attr2[$jj+1], $alto+$repetir[$ii]['max'],
+ @$estilo['fill'], null, $this->_orientacion);
$alto1 = $alto + $repetir[$ii]['max'];
foreach ($repetir[$ii][$jj] as $t) {
$estilo);
$this->_pdf->addText($init, $alto1 + 2,
- $t, $estilo);
+ $t, $estilo, null, $this->_orientacion);
}
}
}
$estilo = $this->_obtenerEstiloCelda($i, $j);
- $this->_pdf->addRectangle($alto, $attr2[$j],
- $alto+$max,
- $attr2[$j+1], @$estilo['fill']);
+ $this->_pdf->addRectangle($attr2[$j], $alto,
+ $attr2[$j+1], $alto+$max, @$estilo['fill'], null,
+ $this->_orientacion);
$alto1 = $alto + $max;
foreach ($txtt[$j] as $t) {
$estilo);
$this->_pdf->addText($init, $alto1 + 2,
- $t, $estilo);
+ $t, $estilo, null, $this->_orientacion);
}
}
}