Skip to content

Instantly share code, notes, and snippets.

@groupdocs-com-kb
Last active January 19, 2024 07:14
Show Gist options
  • Save groupdocs-com-kb/2aab311087d0d07934f0f2b2da926d05 to your computer and use it in GitHub Desktop.
Save groupdocs-com-kb/2aab311087d0d07934f0f2b2da926d05 to your computer and use it in GitHub Desktop.
Render SVG as PDF using C#. For more information, please follow link: https://kb.groupdocs.com/viewer/net/render-svg-as-pdf-using-csharp/
using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
using GroupDocs.Viewer.Results;
using System;
namespace RenderSVGasPDFUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Viewer library
License lic = new License();
lic.SetLicense(@"GroupDocs.Viewer.lic");
using (var viewer = new Viewer("input.svg"))
{
// Save output PDF to disk
var viewOptions = new PdfViewOptions("output.pdf");
viewer.View(viewOptions);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment