private void pdfConverter() { //FIRST PAGE // Create new pdf document and page PdfDocument doc = new PdfDocument(); PdfPage oPage = new PdfPage(); // Add the page to the pdf document and add the captured image to it doc.Pages.Add(oPage); XGraphics xgr = XGraphics.FromPdfPage(oPage); XImage img = XImage.FromFile(@"C:\Temp\img1.jpg"); xgr.DrawImage(img, 0, 0); saveFileDialog.Filter = ("PDF File|*.pdf"); DialogResult btnSave = saveFileDialog.ShowDialog(); if (btnSave.Equals(DialogResult.OK)) { doc.Save(saveFileDialog.FileName); doc.Close(); } img.Dispose(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)