SignPDFRemote
Methode (Function) · gibt Boolean zurück
SignPDFRemote ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (aus der SDK-Dokumentation): Signs a PDF remotely with the CodeB Remote Signature Service (CSC v2, endpoint signatures/signDocBasic): the PDF is sent via HTTPS, the service returns it with a PAdES signature (incremental update, existing content and attachments such as the ZUGFeRD XML stay unchanged).
Rückgabe: True if the signed PDF was written; False otherwise (reason in Last_Error, e.g. "HTTP 401 invalid_credentials").
Hinweis: Requires a valid licence and internet access to the CodeB tenant. Signature level: eIDAS advanced (AdES), not qualified.
Deklaration
Public Function SignPDFRemote(ByVal InputPDFPath As String, ByVal OutputPDFPath As String, ByVal ServerURL As String, ByVal UserName As String, ByVal Password As String, Optional ByVal Level As String = "B-LTA", Optional ByVal Reason As String = "", Optional ByVal Location As String = "", Optional ByVal ContactInfo As String = "", Optional ByVal DoOverWrite As Boolean = True, Optional ByVal LicenseKey As String = "", Optional ByRef EffectiveLevel As String = "", Optional ByVal TimeoutSeconds As Integer = 120) As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
InputPDFPath | String | erforderlich | PDF to sign (max. 10 MiB, not encrypted). For ZUGFeRD: embed the XML first, sign last. |
OutputPDFPath | String | erforderlich | Signed PDF. Empty: the input file is replaced (DoOverWrite must be True). |
ServerURL | String | erforderlich | Base URL of the CodeB tenant, e.g. https://your-codeb-server (https only). https://phone.codeb.io is CodeB's test server only - not for production use. A full .../csc.ashx?action=... or .../csc/v2 URL is accepted as well. |
UserName | String | erforderlich | CodeB user name (HTTP Basic). The tenant must allow it (Oidc:EnablePasswordGrant=true). |
Password | String | erforderlich | CodeB password. Never written to Last_Error or logs. |
Level | String | optional (Standard: "B-LTA") | PAdES level: B-B, B-T, B-LT or B-LTA (default). The service may lower it (see EffectiveLevel). |
Reason | String | optional (Standard: "") | Optional /Reason of the signature. |
Location | String | optional (Standard: "") | Optional /Location of the signature. |
ContactInfo | String | optional (Standard: "") | Optional /ContactInfo of the signature. |
DoOverWrite | Boolean | optional (Standard: True) | True (default) replaces an existing output file. |
LicenseKey | String | optional (Standard: "") | Licence key; empty uses the licence already set. |
EffectiveLevel | String | optional (Standard: "") | Returns the level the service actually produced (e.g. AdES-B-T if no archive timestamp could be added). |
TimeoutSeconds | Integer | optional (Standard: 120) | HTTP timeout in seconds (default 120). |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, LicenseKey)
' …
Dim ergebnis = alo.SignPDFRemote(InputPDFPath, OutputPDFPath, ServerURL, UserName, Password)
COM-Schnittstelle
SignPDFRemote ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 326 von 327) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.