THotPDF.PreparePDFForSigning Method
Prepara un PDF non firmato per la firma esterna riservando l'area del contenitore firma e producendo i byte range che il chiamante firma
Dichiarazione
class function PreparePDFForSigning(var PDFBytes: AnsiString; out Range1Start: Integer; out Range1Length: Integer; out Range2Start: Integer; out Range2Length: Integer; out ContentsHexStart: Integer; out ContentsHexLen: Integer): boolean;
Note
PDFBytes è il documento salvato che THPDFPage.AddSignedSignatureField ha preparato. Il metodo sostituisce al volo il segnaposto /ByteRange con i valori reali e restituisce False quando non trova nessun segnaposto
Range1Start,Range1Length,Range2StarteRange2Lengthsono offset e lunghezze nel file a base 0. Fai l'hash delle due range, in quest'ordine, per ottenere il digest che la firma CMS copre- I byte tra le due range sono l'intera stringa esadecimale
/Contents, delimitatori<e>inclusi, come richiede ISO/IEC 32000-1 12.8.3.3 ContentsHexStartè l'indice a base 1 della prima cifra esadecimale inPDFByteseContentsHexLenil numero di cifre esadecimali riservate. Passa la firma codificata in esadecimale aInsertSignatureHex, che completa un valore più corto con zeri alla fine