Link Search Menu Expand Document

Convert SVG to PDF - VB.NET

PDF SDK sample in VB.NET demonstrating ‘Convert SVG to PDF’

Module1.vb
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("http://somesite.com/files/drawing.svg", "result.pdf")

        End Using

        ' Open result file in default PDF viewer
        Process.Start("result.pdf")

    End Sub

End Module

Download Source Code (.zip)

Return to the previous page Explore PDF SDK