ByteScout PDF SDK – VB.NET – Convert SVG to PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Convert SVG to PDF

How to convert SVG to PDF in VB.NET using ByteScout PDF SDK

How to code in VB.NET to convert SVG to PDF with this step-by-step tutorial

The documentation is designed to help you to implement the features on your side. ByteScout PDF SDK can convert SVG to PDF. It can be used from VB.NET. ByteScout PDF SDK is the SDK for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings.

The SDK samples like this one below explain how to quickly make your application do convert SVG to PDF in VB.NET with the help of ByteScout PDF SDK. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! This basic programming language sample code for VB.NET will do the whole work for you to convert SVG to PDF.

ByteScout PDF SDK free trial version is available on our website. VB.NET and other programming languages are supported.

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns=""> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{0B6308CE-5D90-4F33-ABCE-28FFBEDFB2A0}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>ConvertSvgToPdf.Module1</StartupObject> <RootNamespace>ConvertSvgToPdf</RootNamespace> <AssemblyName>ConvertSvgToPdf</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>Console</MyType> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>ConvertSvgToPdf.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>ConvertSvgToPdf.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> <Prefer32Bit>false</Prefer32Bit> </PropertyGroup> <PropertyGroup> <OptionExplicit>On</OptionExplicit> </PropertyGroup> <PropertyGroup> <OptionCompare>Binary</OptionCompare> </PropertyGroup> <PropertyGroup> <OptionStrict>Off</OptionStrict> </PropertyGroup> <PropertyGroup> <OptionInfer>On</OptionInfer> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.PDF.Converters"> <HintPath>C:\Program Files\Bytescout PDF SDK\net4.5\Bytescout.PDF.Converters.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> <Import Include="System.Linq" /> <Import Include="System.Xml.Linq" /> </ItemGroup> <ItemGroup> <Compile Include="Module1.vb" /> </ItemGroup> <ItemGroup> <Content Include="drawing.svg"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>

Imports System.Drawing.Printing Imports Bytescout.PDF.Converters Module Module1 <STAThread> Sub Main() ' HtmlToPdfConverter can convert HTML files with SVG content, or SVG files directly. Using converter As New HtmlToPdfConverter() converter.PageSize = PaperKind.A4 converter.ConvertHtmlToPdf("drawing.svg", "result.pdf") ' You can also pass a link instead of the input file: 'converter.ConvertHtmlToPdf("", "result.pdf") End Using ' Open result file in default PDF viewer Process.Start("result.pdf") End Sub End Module


Visit ByteScout PDF SDK page or

explore documentation