This sample source code below will display you how to set pdf document display options with pdf sdk in VB.NET. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can be applied to set pdf document display options with pdf sdk using VB.NET.
Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Premium Suite for set pdf document display options with pdf sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Use of ByteScout Premium Suite in VB.NET is also described in the documentation included along with the product.
Our website gives trial version of ByteScout Premium Suite for free. It also includes documentation and source code samples.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to set display options for a viewer application. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add page Dim page = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page) ' Set page mode (which panels should be shown at viewing application start) pdfDocument.PageMode = PageMode.Thumbnail ' show thumbnails panel ' Show/hide various interface elements pdfDocument.ViewerPreferences.CenterWindow = True pdfDocument.ViewerPreferences.FitWindow = True pdfDocument.ViewerPreferences.HideMenubar = True pdfDocument.ViewerPreferences.HideToolbar = True pdfDocument.ViewerPreferences.HideWindowUI = False ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer app Process.Start("result.pdf") End Sub End Class