Guest User

Untitled

a guest
Dec 7th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. $pdf->SetProtection(array('copy'), '', null, 0, null);
  2.  
  3. $pdf->SetMargins(0, 0, 0, true);
  4. $pdf->SetHeaderMargin(0);
  5. $pdf->SetFooterMargin(0);
  6. $pdf->SetAutoPageBreak(false, 0);
  7.  
  8. $pdf->AddPage('L');
  9. $pdf->Image($imagen, -7, 1, 310, 210, '', '', '', false, 300, '', false, false, 0);
  10.  
  11. if(!empty($imagentrasera)){
  12. $pdf->AddPage('L');
  13. $pdf->Image($imagentrasera, -7, 1, 310, 210, '', '', '', false, 300, '', false, false, 0);
  14. }
  15.  
  16. if(!empty($certificado_digital)){
  17. // PENDIENTE DE TERMINAR
  18. $info = array(
  19. 'Name' => __('Certificado PDF',true),
  20. 'Location' => '',
  21. 'Reason' => '',
  22. 'ContactInfo' => '',
  23. );
  24.  
  25. //var_dump($_SERVER['DOCUMENT_ROOT']);
  26. // HAY QUE RETOCAR¡¡¡
  27. $certificado_crt = 'file://'.$_SERVER['DOCUMENT_ROOT'].Configure::read('directorioinstalacion').'app/webroot/Documentos/certificados/'.$certificado_digital;
  28. $certificado_key = 'file://'.$_SERVER['DOCUMENT_ROOT'].Configure::read('directorioinstalacion').'app/webroot/Documentos/certificados/'.$certificado_key;
  29.  
  30. $pdf->setSignature($certificado_crt,$certificado_key, '', '', 1, $info);
  31. }
  32.  
  33.  
  34. echo $pdf->Output(__('Certificado',true).'.pdf', 'I');
Add Comment
Please, Sign In to add comment