Question:I would like to convert from JPG to PDF, I've checked out ImageMagickNET, but it is far too complex for what I am after doing, it needs to be simple. Is there any easy solution on VeryPDF? I do not want to spend too much time to learn a new application.
Answer:According to your needs, VeryPDF provides two quite simply methods for convert image JPG to PDF from C#. Method 1, you can convert JPG to PDF from C# by cloud based application named VeryPDF Image to PDF Converter Cloud API. By this cloud based API, simply run the conversion from C# by copy a URL to C# code. Method 2, you can have a free trial of Image to PDF Converter SDK version. I will state code template here for your reference. When you run the conversion, simply change the input and output file path. Please check more information of those two applications on home page, in the following part, I will show you how to call them from C#.
Method 1, Convert JPG to PDF from C# by cloud based Image to PDF Converter Cloud API
- Here is the code template for your reference:
- Please pay more attention to the URL part. You need to change the API code the real code in your email box or else there will be watermark on output. Change the URL of JPG to the real image file and then run it in C#.
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
string url = "http://online.verypdf.com/api/apikey=XXXXXXXXXXXXX&app=imageproc&infile=
WebRequest request = HttpWebRequest.Create(url);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string urlText = reader.ReadToEnd();
Method 2. Convert JPG to PDF by Image to PDF Converter.
- Please download Image to PDF SDK/COM for Developers. When downloading finishes, there will be a zip file. Please extract it to some folder then you can run the conversion easily.
- When you need to convert JPG to PDF from C#, please refer to the following code templates:
//add image file types
Please check more information on homepage. During the using, if you have any question, please contact us as soon as possible.