PrintPDFDocument
Methode (Function) · gibt Boolean zurück
PrintPDFDocument ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Prints a PDF document.
Rückgabe: True if printing succeeded; False otherwise (see Last_Error).
Deklaration
Public Function PrintPDFDocument(ByVal FileName As String, ByVal LicenseKey As String, Optional ByRef PrinterName As String = "", Optional ByVal AutoRotate As Boolean = True, Optional ByVal AutoScaling As Boolean = True, Optional ByRef PrintTitle As String = "", Optional ByVal Password As String = "", Optional ByVal StartPage As Integer = -1, Optional ByVal EndPage As Integer = -1) As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
FileName | String | erforderlich | Path of the PDF file |
LicenseKey | String | erforderlich | Licence key; if empty the key already set on the object, the global key or a key stored in the registry is used |
PrinterName | String | optional (Standard: "") | Name of the printer (passed by reference) |
AutoRotate | Boolean | optional (Standard: True) | True rotates pages automatically (default True) |
AutoScaling | Boolean | optional (Standard: True) | True scales pages automatically (default True) |
PrintTitle | String | optional (Standard: "") | Title of the print job (passed by reference) |
Password | String | optional (Standard: "") | Password of the PDF, if protected |
StartPage | Integer | optional (Standard: -1) | First page to print (default -1) |
EndPage | Integer | optional (Standard: -1) | Last page to print (default -1) |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
Dim FileName As String = ""
Dim LicenseKey As String = ""
If Not alo.PrintPDFDocument(FileName, 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 fileName = "";
string licenseKey = "";
string printerName = "";
bool autoRotate = true;
bool autoScaling = true;
string printTitle = "";
if (!alo.PrintPDFDocument(fileName, licenseKey, ref printerName, autoRotate, autoScaling, ref printTitle))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}
Artikel mit PrintPDFDocument
COM-Schnittstelle
PrintPDFDocument ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 283 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.