Ver Mensaje Individual
  #6 (permalink)  
Antiguo 13/11/2019, 05:17
herokimmanu
 
Fecha de Ingreso: agosto-2015
Ubicación: Chile
Mensajes: 7
Antigüedad: 8 años, 8 meses
Puntos: 0
Respuesta: Incluir Transparency en FPDF

Estuve revisando mientras esperaba la descarga y encontré lo siguiente:

1. En el directorio php existe una carpeta llamada fonts, la cual dupliqué y llame font; solucionó el problema con las fuentes.

2. Ahora me indica que hay problemas en el archivo de alphapdf.php:

Código:
Fatal error: Uncaught Error: Call to undefined method PDF::_put() in /Applications/XAMPP/xamppfiles/htdocs/tmp/include/fpdf/alphapdf.php:44 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/tmp/include/fpdf/alphapdf.php(65): AlphaPDF->_putextgstates() #1 /Applications/XAMPP/xamppfiles/lib/php/fpdf.php(1764): AlphaPDF->_putresources() #2 /Applications/XAMPP/xamppfiles/htdocs/tmp/include/fpdf/alphapdf.php(35): FPDF->_enddoc() #3 /Applications/XAMPP/xamppfiles/lib/php/fpdf.php(302): AlphaPDF->_enddoc() #4 /Applications/XAMPP/xamppfiles/lib/php/fpdf.php(987): FPDF->Close() #5 /Applications/XAMPP/xamppfiles/htdocs/tmp/pdf/recipe-fpdf.php(152): FPDF->Output() #6 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/tmp/include/fpdf/alphapdf.php on line 44
Al revisar el codigo de alphapdf.php las lineas de código que causan el error son las siguientes:

Código PHP:
    function _putextgstates()
    {
        for (
$i 1$i <= count($this->extgstates); $i++)
        {
            
$this->_newobj();
            
$this->extgstates[$i]['n'] = $this->n;
            
$this->_put('<</Type /ExtGState');
            
$parms $this->extgstates[$i]['parms'];
            
$this->_put(sprintf('/ca %.3F'$parms['ca']));
            
$this->_put(sprintf('/CA %.3F'$parms['CA']));
            
$this->_put('/BM '.$parms['BM']);
            
$this->_put('>>');
            
$this->_put('endobj');
        }
    }

    function 
_putresourcedict()
    {
        
parent::_putresourcedict();
        
$this->_put('/ExtGState <<');
        foreach(
$this->extgstates as $k=>$extgstate)
            
$this->_put('/GS'.$k.' '.$extgstate['n'].' 0 R');
        
$this->_put('>>');
    }

    function 
_putresources()
    {
        
$this->_putextgstates();
        
parent::_putresources();
    } 
Por otra parte, si las quito, la extensión queda inutilizada.

Volví a quedar en panne otra vez.

*Descargando AMPPS*