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

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

ByteScout PDF SDK – VB.NET – 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


  Click here to get your Free Trial version of the SDK

prev