Strumenti Utente

Strumenti Sito


sviluppo:firma_grafometrica

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisioneRevisione precedente
Prossima revisione
Revisione precedente
sviluppo:firma_grafometrica [2017/05/17 14:54] m.biagiolisviluppo:firma_grafometrica [2018/03/19 10:45] (versione attuale) – modifica esterna 127.0.0.1
Linea 17: Linea 17:
   * FGRAFOM_MAKE_PDF_ORIGINAL: Specify the Pades signature   * FGRAFOM_MAKE_PDF_ORIGINAL: Specify the Pades signature
   * FGRAFOM_SAVE_IN_SAME_FOLDER: Specify to save the signed file in same folder of the original file   * FGRAFOM_SAVE_IN_SAME_FOLDER: Specify to save the signed file in same folder of the original file
-  * Specify to save the signed file in same folder of the original file: use this option if you want to overwrite the original file with signed file+  * FGRAFOM_FORCE_OVERWRITE: Specify to save the signed file in same folder of the original file: use this option if you want to overwrite the original file with signed file 
 + 
 +======Utilizzo====== 
 + 
 +=====Firma===== 
 + 
 +<code> 
 +$path = "D:/Works/FirmaCerta_SDK/PDF Test/test1.pdf";         
 +$device = "tdWacomSTU530"; 
 +$certificate = "Firma GrafoCerta (FEA) Demo_TRUST"; 
 +$objFirma = itaFirmaGrafometrica::getFirmaGrafometrica(); 
 +$objFirma->sign($path, $device, $certificate, array( 
 + 'returnForm' => 'cwbZzzNamirialSignatureTest', 
 + 'returnId' => 'signature', 
 + 'returnEvent' => 'onSignatureCallback' 
 +)); 
 +if ($objFirma->getErrorCode() !== 0) { 
 + Out::msgStop("ERRORE", $objFirma->getErrorDescription());    
 +}                          
 +</code> 
 + 
 +Occorre passare al metodo i seguenti parametri: 
 +  * Il path del documento da firmare 
 +  * Il dispositivo (alias) utilizzato per la firma 
 +  * Il certificato (alias) utilizzato per la firma 
 +  * Un array dove specificare l'evento di ritorno (returnForm, returnId, returnEvent). 
 + 
 +Nell'evento di ritorno verranno restituiti: 
 +  * Il path del documento firmato 
 +  * Esito (True/False) 
 +  * Messaggio di errore (se esito=False) 
 + 
 +=====Verifica===== 
 + 
 +<code> 
 +$path = "D:/Works/PhpDev/dati/itaEngine/tmp/uploads/20170517144428144.pdf"; 
 +$objFirma = itaFirmaGrafometrica::getFirmaGrafometrica(); 
 +$objFirma->verify($path, array( 
 + 'returnForm' => 'cwbZzzNamirialSignatureTest', 
 + 'returnId' => 'verify', 
 + 'returnEvent' => 'onVerifySignatureCallback' 
 +)); 
 +if ($objFirma->getErrorCode() !== 0) { 
 + Out::msgStop("ERRORE", $objFirma->getErrorDescription()); 
 +}   
 +</code> 
 + 
 +Occorre passare al metodo i seguenti parametri: 
 +  * Il path del documento da verificare 
 +  * Un array dove specificare l'evento di ritorno (returnForm, returnId, returnEvent). 
 + 
 +Nell'evento di ritorno verrà restituito solamente l'esito (True/False).
sviluppo/firma_grafometrica.1495032885.txt.gz · Ultima modifica: 2018/03/19 10:45 (modifica esterna)