Last active
December 6, 2023 17:46
Convert JPG to PDF Using C#. For more information, please follow link: https://kb.groupdocs.com/conversion/net/convert-jpg-to-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.Conversion; | |
using GroupDocs.Conversion.Options.Convert; | |
namespace ConvertJPGtoPDFUsingCSharp | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Set License to avoid the limitations of Conversion library | |
License lic = new License(); | |
lic.SetLicense(@"GroupDocs.Conversion.lic"); | |
// Load the source JPG file | |
using (var converter = new Converter("input.jpg")) | |
{ | |
// Set the convert options for PDF format | |
var options = new PdfConvertOptions(); | |
// Convert to PDF format | |
converter.Convert("converted.pdf", options); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment