ConvertPDF2PDFA
Methode (Function) · gibt Boolean zurück
ConvertPDF2PDFA ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Converts a PDF file to PDF/A. If the input is a .docx file it is converted to PDF via ConvertDOCX2PDF instead.
Rückgabe: True if the output file was created; False otherwise (see Last_Error).
Deklaration
Public Function ConvertPDF2PDFA(ByVal InputPDF As String, ByVal OutputPDF As String, ByVal Licensekey As String, Optional ByVal ConverDecimalDot2Comma As Boolean = False) As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
InputPDF | String | erforderlich | Path of the input PDF (or .docx) file |
OutputPDF | String | erforderlich | Path of the output PDF file; must differ from the input |
Licensekey | String | erforderlich | Licence key; must not be empty |
ConverDecimalDot2Comma | Boolean | optional (Standard: False) | Only used for .docx input: passed on to ConvertDOCX2PDF |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim InputPDF As String = ""
Dim OutputPDF As String = ""
Dim Licensekey As String = ""
If Not alo.ConvertPDF2PDFA(InputPDF, OutputPDF, Licensekey) 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 outputPDF = "";
string licensekey = "";
if (!alo.ConvertPDF2PDFA(inputPDF, outputPDF, licensekey))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}
COM-Schnittstelle
ConvertPDF2PDFA ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 120 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.