FileAttachments

Methode (Function) · gibt AloahaPDF.NET.PDF.File_Attachment() zurück

FileAttachments ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.

Beschreibung (Originaltext der englischen SDK-Dokumentation): Extracts all embedded file attachments of a PDF.

Rückgabe: Array of File_Attachment (file name and bytes). Nothing if not licensed (Last_Error = "License Problem"); engine errors are copied to Last_Error and Last_Error_Code.

Deklaration

Public Function FileAttachments(ByVal InputPDF As String, Optional ByVal OwnwerPass As String = "", Optional ByVal ForceLiveCycleMode As Boolean = False, Optional ByVal Licensekey As String = "") As AloahaPDF.NET.PDF.File_Attachment()

Parameter

NameTypPflichtBeschreibung
InputPDFStringerforderlichPath of the PDF file
OwnwerPassStringoptional (Standard: "")Owner password of the PDF, if encrypted
ForceLiveCycleModeBooleanoptional (Standard: False)Passed to the PDF engine to force LiveCycle mode when reading attachments
LicensekeyStringoptional (Standard: "")Optional licence key; if empty the stored licence or registry licence is used

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim InputPDF As String = ""
Dim ergebnis = alo.FileAttachments(InputPDF)

Aufruf (C#)

var zfStandard = Aloaha_ZUGFeRD.iXML.ZUGFeRDVersion.xInvoice;   // Optional ByRef im Konstruktor: in C# mit ref übergeben
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL", ref zfStandard);
string inputPDF = "";
var ergebnis = alo.FileAttachments(inputPDF);

Quelle: XML-Dokumentationskommentare des Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM. In C# werden ByRef-Parameter mit ref übergeben, VB-Eigenschaften mit Parametern heißen get_…/set_…, optionale Parameter können entfallen.