ConvertDOCX2PDF

Methode (Function) · gibt Boolean zurück

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

Beschreibung (Originaltext der englischen SDK-Dokumentation): Converts a DOCX, DOC or RTF file to PDF.

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

Deklaration

Public Function ConvertDOCX2PDF(ByVal Input_DOCX_Path As String, Optional ByRef Output_PDF_Path As String = "", Optional ByVal DoOverWrite As Boolean = True, Optional ByVal Licensekey As String = "", Optional ByVal ConverDecimalDot2Comma As Boolean = False) As Boolean

Parameter

NameTypPflichtBeschreibung
Input_DOCX_PathStringerforderlichPath of the input .docx, .doc or .rtf file
Output_PDF_PathStringoptional (Standard: "")Path of the output PDF; if empty the input path + ".pdf" is used and returned here (input/output)
DoOverWriteBooleanoptional (Standard: True)True deletes an existing output file first (default True); otherwise an existing output is an error
LicensekeyStringoptional (Standard: "")Licence key; if empty the key already set on the object or the global key is used (no registry lookup)
ConverDecimalDot2CommaBooleanoptional (Standard: False)Currently not used

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim Input_DOCX_Path As String = ""
If Not alo.ConvertDOCX2PDF(Input_DOCX_Path) Then
    Console.WriteLine("Fehler: " & alo.Last_Error)
End If

Aufruf (C#)

var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL");
string input_DOCX_Path = "";
string output_PDF_Path = "";
if (!alo.ConvertDOCX2PDF(input_DOCX_Path, ref output_PDF_Path))
{
    Console.WriteLine("Fehler: " + alo.Last_Error);
}

Artikel mit ConvertDOCX2PDF

COM-Schnittstelle

ConvertDOCX2PDF ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 119 von 343) 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.

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.