Salve a tutti... ho creato il mio pdf che mi genere una paginetta con dei dati ed un codice a barre nell'header.
Codice PHP:
  $style = array(
    
'position' => '',
    
'align' => 'C',
    
'stretch' => false,
    
'fitwidth' => true,
    
'cellfitalign' => '',
    
'border' => false,
    
'hpadding' => 'auto',
    
'vpadding' => 'auto',
    
'fgcolor' => array(0,0,0),
    
'bgcolor' => false//array(255,255,255),
    
'text' => true,
    
'font' => 'helvetica',
    
'fontsize' => 6,
    
'stretchtext' => 4
  
);
  
$this->write1DBarcode($this->codice'C39'1505''120.4$style'R'); 
con questa riga genero il codice a barre.
Ora vorrei salvare il codice a barre su un altro file (png o gif) per poterlo importare in un foglio excel (non ho trovato come crearlo in PHPexcel)
Sapete come si fa?
Io con questo codice lo riesco a vedere a video, ma non so perchè non me lo salva

Codice PHP:
  $_BAR=new TCPDFBarcode($this->codice'C39');
  
$img=$_BAR->getBarcodePNG();
  
print_r($img);
  
imagepng($img"prova.png",80);
  
imagedestroy($img);