ByteScout PDF SDK - C# - Convert SVG to PDF - ByteScout

ByteScout PDF SDK – C# – Convert SVG to PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Convert SVG to PDF

How to convert SVG to PDF in C# using ByteScout PDF SDK

This tutorial will show how to convert SVG to PDF in C#

Every ByteScout tool contains example C# source codes that you can find here or in the folder with installed ByteScout product. ByteScout PDF SDK: the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can convert SVG to PDF in C#.

This code snippet below for ByteScout PDF SDK works best when you need to quickly convert SVG to PDF in your C# application. Just copy and paste the code into your C# application’s code and follow the instruction. You can use these C# sample examples in one or many applications.

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

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Diagnostics; using System.Drawing.Printing; using Bytescout.PDF.Converters; namespace ConvertSvgToPdf { class Program { [STAThread] static void Main(string[] args) { // HtmlToPdfConverter can convert HTML files with SVG content, or SVG files directly. using (HtmlToPdfConverter converter = 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("http://somesite.com/files/drawing.svg", "result.pdf"); } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next