ByteScout PDF Renderer SDK - VB.NET - Silent PDF Document Printing - ByteScout

ByteScout PDF Renderer SDK – VB.NET – Silent PDF Document Printing

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Renderer SDK – VB.NET – Silent PDF Document Printing

silent PDF document printing in VB.NET and ByteScout PDF Renderer SDK

How to use ByteScout PDF Renderer SDK for silent PDF document printing in VB.NET

Source code documentation samples provide quick and easy way to add a required functionality into your application. ByteScout PDF Renderer SDK helps with silent PDF document printing in VB.NET. ByteScout PDF Renderer SDK is the library that renders PDF into high quality images and thumbnails. Includes various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications.

This rich sample source code in VB.NET for ByteScout PDF Renderer SDK includes the number of functions and options you should do calling the API to implement silent PDF document printing. To do silent PDF document printing in your VB.NET project or application you may simply copy & paste the code and then run your app! VB.NET application implementation typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Free trial version of ByteScout PDF Renderer SDK is available on our website. Get it to try other samples for VB.NET.

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
Imports Bytescout.PDFRenderer Class Program Friend Shared Sub Main(args As String()) Const PrinterName As String = "Microsoft Print to PDF" ' Create an instance of Bytescout.PDFRenderer.DocumentPrinter object and register it. Dim documentPrinter As New DocumentPrinter() documentPrinter.RegistrationName = "demo" documentPrinter.RegistrationKey = "demo" ' Load PDF document. documentPrinter.LoadDocumentFromFile("multipage.pdf") ' Change some printing options for demo purposes ' (note, some options might be not supported by the printer): ' Change paper orientation documentPrinter.Landscape = True ' Set number of copies documentPrinter.Copies = 2 ' Set collation documentPrinter.Collate = True ' Force black and white printing documentPrinter.Color = False ' Print all document pages to the specified printer documentPrinter.PrintDocument(PrinterName) ' To print specific pages use overridden methods allowing to define pages to print: 'documentPrinter.PrintDocument(PrinterName, 2, 4) ' printer pages from 3 to 5 'documentPrinter.PrintDocument(PrinterName, New Integer() {0, 2, 3, 4, 6}) ' print specific pages 'documentPrinter.PrintDocument(PrinterName, "1,3-5,7-") documentPrinter.Dispose() End Sub End Class

Try it today: Get 60 Day Free Trial or sign up for Web API

SilentPrinting.VS2005.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{FD27D536-AE58-41B6-89AC-EEFF1BBFC4AD}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>SilentPrinting</RootNamespace> <AssemblyName>SilentPrinting</AssemblyName> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Reference Include="Bytescout.PDFRenderer, Version=1.10.0.98, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> </ItemGroup> <ItemGroup> <Content Include="..\..\multipage.pdf"> <Link>multipage.pdf</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" /> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

SilentPrinting.VS2008.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{FD27D536-AE58-41B6-89AC-EEFF1BBFC4AD}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>SilentPrinting</RootNamespace> <AssemblyName>SilentPrinting</AssemblyName> <OldToolsVersion>2.0</OldToolsVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Reference Include="Bytescout.PDFRenderer, Version=1.10.0.98, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> </ItemGroup> <ItemGroup> <Content Include="..\..\multipage.pdf"> <Link>multipage.pdf</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.Targets" /> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

SilentPrinting.VS2010.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{FD27D536-AE58-41B6-89AC-EEFF1BBFC4AD}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>SilentPrinting</RootNamespace> <AssemblyName>SilentPrinting</AssemblyName> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG,TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Reference Include="Bytescout.PDFRenderer, Version=1.10.0.98, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> <Compile Include="Properties\AssemblyInfo.vb" /> </ItemGroup> <ItemGroup> <Content Include="..\..\multipage.pdf"> <Link>multipage.pdf</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.Targets" /> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF Renderer SDK page

Explore ByteScout PDF Renderer SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next