Last active
January 19, 2024 07:14
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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