Lançado Adianti Framework 7.6!
Clique aqui para saber mais
PDF galeta to tendando abrir um arquivo pedf, no sistema, ele gera normal, porem quando chega no redFile, não abre nem gtk, nem web, porem não da erro tb e o arquivo é gerado normal ...
AS
PDF  
Fechado
galeta to tendando abrir um arquivo pedf, no sistema, ele gera normal, porem quando chega no redFile, não abre nem gtk, nem web, porem não da erro tb e o arquivo é gerado normal

  1. <?php
  2.     public function detalhes($param){
  3.       try{
  4.             TTransaction::open("mysql");// abre a transação
  5. $repo =  new TRepository("Funcionarios");
  6. $criteria = new TCriteria();
  7. $criteria->add(new TFilter("id","=",$param['key']));
  8.                  $veiculos =  $repo->load($criteria);
  9. $withds = array(40,150,80,120,80);// largura da tabela
  10. $tr = new TTableWriterPDF($withds);
  11. $tr->addStyle('title','Arial','10','BI','#407b49','#ffffff');
  12. $tr->addStyle('datap','Arial','10','','#000000','#869fbb');
  13. $tr->addStyle('datai','Arial','10','','#000000','#ffffff');
  14. $tr->addStyle('header','Arial','10','BI','#cc0000','#ffefef');
  15. $tr->addStyle('footer','Arial','10','BI','#2b2b2b','#b5ffb4');
  16.  $color FALSE;
  17.   
  18. foreach ($veiculos as $key ) {
  19.     $stile  $color 'datap':'datai'
  20. $tr->addRow();
  21. $tr->addCell($key->nome.' '.$key->sobrenome,'center','header',5);
  22. $tr->addRow();
  23. $nome $key->nome;
  24. $tr->addRow();
  25. $tr->addCell'Telefone','center','title',2);
  26. $tr->addCell($key->telefone,'center',$stile,2);
  27. $tr->addRow();
  28. $tr->addCell'Cargo','center','title',2);
  29. $tr->addCell($key->getCargo()->nome,'center',$stile,2);
  30. $tr->addRow();
  31. $tr->addCell'Rua','center','title',2);
  32. $tr->addCell($key->rua,'center',$stile,2);
  33. $tr->addRow();
  34. $tr->addCell'Bairro','center','title',2);
  35. $tr->addCell($key->bairro,'center',$stile,2);
  36. $tr->addRow();
  37. $tr->addCell'Cidade','center','title',2);
  38. $tr->addCell($key->cidade,'center',$stile,2);
  39. $tr->addRow();
  40. $tr->addCell'UF','center','title',2);
  41. $tr->addCell($key->uf,'center',$stile,2);
  42.  $color = !$color;
  43. }
  44. $tr->addRow();
  45. $tr->addCell(date('Y-m-d  h:i:s'),'center','footer',5);
  46. $tr->save('app/output/funcionarios/'.$nome.'.pdf');
  47. parent::openFile('app/output/funcionarios/'.$nome.'.pdf');
  48.          new TMessage('info',"Relatorio do funcionario {$nome} gerado com susseso");
  49.       TTransaction::close();// abre a transação
  50.             
  51.         }catch(Exeption $e){
  52.             new TMessage('error',$e->getMessage());
  53.         }
  54.     }
  55. ?>

Curso completo Meu Negócio Pronto
Use para si, ou transforme em um negócio: Inclui aulas e códigos-fontes
Gestor de conteúdo (SITE) + Loja Virtual (E-Commerce) + Emissor de Notas para infoprodutos


Meu negócio pronto Quero me inscrever agora!

Comentários (2)


PD

Oi Alexandre,

Na Web veja os popups. Seu navegador deve estar bloqueando.
No desktop (Gtk), você deve configurar o programa que irá abrir os arquivos no application.ini, veja:
viewer = /usr/bin/gnome-open

abraços,
Pablo
AS

deu certo pablo vlw
mais uma vez