You must Sign In to post a response.
  • Category: .NET

    How to convert image file into pdf in c# windows application

    i want to convert image file into pdf format .i working windows requriement is when i scan image then i want to convert these into pdf give me suggestion and i also need coding.
  • #732124

    this may help you.


  • #732125

    for convert image file into pdf in c# you have to use GhostScript ,

    visit this also,


  • #732134

    Check the following links

  • #732136
    thanks all of you..

  • #732147

    this may help you.


  • #732837
    but i have also problem for converting image to pdf following is my code so plz suggest me these coding.
    if (txtscanaccno.Text!="")
    // string strPdfFile = textBox1.Text + "\\test.pdf";
    string strPdfFile = @"D:\mohan\MACRO WINDOWS\MACRO WINDOWS\MACRO WINDOWS\Scan\"+scanfile;

    //textBox2.Text = strPdfFile;

    iTextSharp.text.Document document = new iTextSharp.text.Document();
    using (var stream = new FileStream(strPdfFile, FileMode.Create, FileAccess.Write, FileShare.None))
    iTextSharp.text.pdf.PdfWriter.GetInstance(document, stream);
    foreach (string strFileName in scanfile )
    using (var imageStream = new FileStream(@"D:\mohan\MACRO WINDOWS\MACRO WINDOWS\MACRO WINDOWS\Scan\"+strFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
    var image = iTextSharp.text.Image.GetInstance(imageStream);
    catch (Exception ex)
    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

  • #737960
    Do you want to convert the image to searchable or non-searchable PDF file? In our application, we used to save PDF as searchable and non-searchable PDF using a commercial SDK.

    If you want to convert it to searchable PDF, you should use one of the OCR engines. Here is a codeproject article about it:

    If you want it to be non-searchable PDF, you can check this link:

  • #738767
    I am using Kernel for Image to PDF Software. This program migrates all Image file to PDF file format. It migrates any types of Image format to PDF file format. For more details see this site:

  • #744654
    I use Aspose.PDF for .NET API to convert images to PDF and vice versa and so far this API has been giving me good results. You can try this library to check out more features this lib offers:

  • #752309
    [Response removed by Admin. Read forum policies.]

  • Sign In to post your comments