THPDFCSCSignatureProvider.EstimateSignatureSize Method

function EstimateSignatureSize(
  const Request: THPDFSignatureProviderRequest;
  out SignatureBytes: Integer): THPDFSignatureProviderStatus;
  override;

Reports the signature placeholder size in bytes to set aside for this credential before signing

The configured THPDFCSCOptions.EstimatedSignatureBytes takes precedence when it is positive, so deployments that know their provider's exact signature size can pin the placeholder

Without an explicit estimate, RSA credentials (hsaRSAPKCS1v15 and hsaRSAPSS) derive the size as (KeyBits+7) div 8 from the cached credential info provided it fits MaxSignatureBytes

The method returns spsValid with a positive estimate, or spsUnsupported with zero when neither the configuration nor the credential metadata yields a size, for instance for EC credentials without an explicit estimate

THPDFCSCCredentialInfo Record

CMS Placeholder Auto-Sizing

CSC Remote Signature Provider