I'm trying to sign multiple documents with Embarcadero C++ Builder 11.2 and Gnostice PDFToolkit VCL, but it only signs the first one. In the second it gives an error that I attach. Does somebody knows why it could be? This is the code:
for(int i=0; i<FileListBox1->Items->Count; i++){
if(FileExists(FileListBox1->Items->Strings[i])){
FileListBox1->Selected[i] = true;
try{
gtPDFDocumento->LoadFromFile(FileListBox1->Items->Strings[i]);
gtPDFDocumento->AddSignature("firma.pfx", "pass", Now(), "texto", "Toledo", "925.28.39.50", 2 , "Firma Digital IACLM", gtRect(365, 935, 760, 990), LDisplayOptions, c, FT);
gtPDFDocumento->SaveToFile("firmado."+FileListBox1->Items->Strings[i]);
//Liberar recursos
gtPDFDocumento->Reset();
FreeAndNil(gtPDFDocumento);
}
catch(Exception *e){
ShowMessage("Ha ocurrido el error: "+e->Message+", avise a infórmatica.");
ShowMessage("Error. No se ha podido firmar la liquidación, hable con informática.");
return;
}
}
else{
ShowMessage("Error. No se encuentra el PDF, hable con informática.");
return;
}
}
Thanks.
I'm trying to sign multiple documents with Embarcadero C++ Builder 11.2 and Gnostice PDFToolkit VCL, but it only signs the first one. In the second it gives an error that I attach