Pass from Generator to Printing

Pass from Generator to Printing

Forum member · Apr 4, 2011
Is there a method possible to pass a ceTe.DynamicPDF.Document to a PrintJob? Theoretical Example: Dim myfile As Document = myPDFDocument.Draw() Dim myInputPDF As InputPdf = New InputPdf(myfile) Dim MyPrintJob As PrintJob = New PrintJob("Printer", myInputPDF)

Re: Pass from Generator to Printing

Support · Apr 4, 2011
Hello, It is possible to print using the Document object, you will have to call the Draw method on the Document object which will return the PDF as byte array and this can be passed on to the InputPdf object to construct the PrintJob object. Dim MyDocument As Document = New Document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage) MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center)) Dim pdf As Printing.InputPdf = New InputPdf(MyDocument.Draw()) Dim printer As Printer = New Printer("PrintToFile") Dim job As PrintJob = New PrintJob(printer, pdf) job.Print() Thanks, ceTe Software Support Team.