-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.vb
26 lines (23 loc) · 1.17 KB
/
Program.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
' Developer Express Code Central Example:
' How to use the PDF printer settings
Imports DevExpress.Pdf
Namespace PdfProcessorPrinterOptions
Friend Class Program
Shared Sub Main(ByVal args As String())
' Create a Pdf Document Processor instance and load a PDF into it.
Dim documentProcessor As PdfDocumentProcessor = New PdfDocumentProcessor()
documentProcessor.LoadDocument("..\..\Demo.pdf")
' Declare the PDF printer settings.
Dim pdfPrinterSettings As PdfPrinterSettings = New PdfPrinterSettings()
' Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Portrait
pdfPrinterSettings.PageNumbers = New Integer() {1, 3, 4, 5}
' Setting the PdfPrintScaleMode property to CustomScale requires
' specifying the Scale property, as well.
pdfPrinterSettings.ScaleMode = PdfPrintScaleMode.CustomScale
pdfPrinterSettings.Scale = 90
' Print the document using the specified printer settings.
documentProcessor.Print(pdfPrinterSettings)
End Sub
End Class
End Namespace