CreateDocFromXML

Methode (Function) · gibt Boolean zurück

CreateDocFromXML ist eine Methode der Klasse Aloaha_ZUGFeRD.XML in der Aloaha ZUGFeRD SDK.

Beschreibung (aus der SDK-Dokumentation): Creates a visual invoice (DOCX or PDF) from a ZUGFeRD / Factur-X / XRechnung XML file using a DOCX template. If the output is a PDF, the XML is also embedded into it (PDF/A-3 hybrid invoice) via MergeXMLIntoPDF.

Rückgabe: True if the output file was created; False otherwise (see Last_Error).

Hinweis: Sends a licence ping.

Deklaration

Public Function CreateDocFromXML(ByVal XMLPath As String, ByVal OutputDocPath As String, Optional ByRef DocxTemplatePath As String = "", Optional ByVal Licensekey As String = "", Optional ByVal DoOverWrite As Boolean = True, Optional ByVal AdditionalAttachment As String = "", Optional ByVal ConverDecimalDot2Comma As Boolean = False) As Boolean

Parameter

NameTypPflichtBeschreibung
XMLPathStringerforderlichPath of the invoice XML file
OutputDocPathStringerforderlichPath of the output file; extension must be .docx or .pdf
DocxTemplatePathStringoptional (Standard: "")DOCX template (input/output). If empty or not existing, the DocXTemplate_Path property is used; if that is empty too, the built-in template is written to the temp folder. The path actually used is returned here
LicensekeyStringoptional (Standard: "")Licence key; if empty the key already set on the object or the global key is used
DoOverWriteBooleanoptional (Standard: True)True allows overwriting an existing output file (default True)
AdditionalAttachmentStringoptional (Standard: "")Optional path of an additional file to embed (PDF output only)
ConverDecimalDot2CommaBooleanoptional (Standard: False)True writes decimal numbers with comma as decimal separator

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, LicenseKey)
' …
Dim ergebnis = alo.CreateDocFromXML(XMLPath, OutputDocPath)

Artikel mit CreateDocFromXML

Quelle: XML-Dokumentationskommentare der Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM; in C# mit Semikolon.