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
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
Input_DOCX_Path | String | erforderlich | Path of the input .docx, .doc or .rtf file |
Output_PDF_Path | String | optional (Standard: "") | Path of the output PDF; if empty the input path + ".pdf" is used and returned here (input/output) |
DoOverWrite | Boolean | optional (Standard: True) | True deletes an existing output file first (default True); otherwise an existing output is an error |
Licensekey | String | optional (Standard: "") | Licence key; if empty the key already set on the object or the global key is used (no registry lookup) |
ConverDecimalDot2Comma | Boolean | optional (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
XRechnungs-XML direkt in eine Winword-Datei oder ein PDF-Dokument umwandeln
Ein wenig beachtetes Feature des Aloaha ZUGFeRD Toolkits ist die Möglichkeit, ein Winword-DOCX-Template mit Werten aus dem ZUGFeRD-XML zu „befüllen“ und anschließend in ein ZUGFeRD PDF/A umzuwandeln.…
ZUGFeRD XML mit DOCX Template zusammenführen und in ZUGFeRD PDF/A umwandeln
Mit dem Aloaha ZUGFeRD Toolkit ist es möglich, ein Winword-DOCX-Template mit Werten aus dem ZUGFeRD-XML zu “befüllen” und danach in ein ZUGFeRD PDF/A umzuwandeln. Das kann zum Beispiel auch…
Word-Vorlage für ZUGFeRD-PDF/A: Platzhalter und BT-Nummern
Neben dem Einbetten von XML in ein vorhandenes PDF bietet das Aloaha ZUGFeRD SDK einen zweiten Weg zur hybriden E-Rechnung: Sie gestalten Ihr Rechnungslayout einmal als Word-Vorlage (DOCX) mit Platzhaltern . Das SDK …
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.