PDFAMetaProperties
Methode (Function) · gibt Boolean zurück
PDFAMetaProperties ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Reads the ZUGFeRD / Factur-X XMP extension properties (DocumentFileName, ConformanceLevel, DocumentType, Version) from the metadata of a PDF.
Rückgabe: True if version, file name and conformance level were found, otherwise False.
Deklaration
Public Function PDFAMetaProperties(ByVal InputPDF As String, ByRef ZUGFeRD_Version As String, ByRef ZUGFeRD_Level As String, ByRef ZUGFeRD_FileName As String, Optional ByVal Licensekey As String = "", Optional ByRef ZUGFeRD_DocumentType As String = "", Optional ByRef XMLMetaDataSTR As String = "") As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
InputPDF | String | erforderlich | Path of the PDF file |
ZUGFeRD_Version | String | erforderlich | (output) Version from the XMP metadata |
ZUGFeRD_Level | String | erforderlich | (output) Conformance level, e.g. EN 16931, EXTENDED |
ZUGFeRD_FileName | String | erforderlich | (output) Name of the embedded XML file (only if it contains .xml) |
Licensekey | String | optional (Standard: "") | Optional licence key |
ZUGFeRD_DocumentType | String | optional (Standard: "") | (output) Document type, e.g. INVOICE |
XMLMetaDataSTR | String | optional (Standard: "") | Reserved; not filled |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim InputPDF As String = ""
Dim ZUGFeRD_Version As String = ""
Dim ZUGFeRD_Level As String = ""
Dim ZUGFeRD_FileName As String = ""
If Not alo.PDFAMetaProperties(InputPDF, ZUGFeRD_Version, ZUGFeRD_Level, ZUGFeRD_FileName) Then
Console.WriteLine("Fehler: " & alo.Last_Error)
End If
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 = "";
string zugferd_Version = "";
string zugferd_Level = "";
string zugferd_FileName = "";
string licensekey = "";
string zugferd_DocumentType = "";
string xmlMetaDataSTR = "";
if (!alo.PDFAMetaProperties(inputPDF, ref zugferd_Version, ref zugferd_Level, ref zugferd_FileName, licensekey, ref zugferd_DocumentType, ref xmlMetaDataSTR))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}