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 application.my requriement is when i scan image then i want to convert these into pdf file.so give me suggestion and i also need coding.
  • #732124
    http://www.codeproject.com/Articles/28609/Converting-Image-Files-to-PDF

    this may help you.


    -Tanya

  • #732125
    hey,

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

    visit this also,
    http://cyotek.com/blog/convert-a-pdf-into-a-series-of-images-using-csharp-and-ghostscript

    thanks,
    ketan

  • #732134
    Hi,

    Check the following links

    http://www.codeproject.com/Articles/317700/Convert-a-PDF-into-a-Series-of-Images-using-Csharp

    http://www.dnzone.com/forum/topic/1003/

    http://stephenchy520.blog.com/2011/06/13/how-to-use-c-convert-image-to-pdf/

    http://www.developerfusion.com/code/5682/create-pdf-files-on-fly-in-c/

  • #732136
    thanks all of you..

  • #732147
    http://www.codeproject.com/Articles/28609/Converting-Image-Files-to-PDF

    this may help you.


    -Tanya

  • #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);
    document.Open();
    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);
    document.Add(image);
    document.NewPage();
    }
    }
    document.Close();
    }
    }
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    thanks,
    mohan

  • #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:
    http://codeproject.com/Articles/317163/OCR-with-LEADTOOLS-The-Better-Choice

    If you want it to be non-searchable PDF, you can check this link:
    http://leadtools.com/help/leadtools/v18/dh/to/leadtools.topics.pdf~pdf.topics.programmingwithpdf.html#AsRasterImage

  • #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: http://www.imagetopdfconversion.com

  • #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:

    http://www.aspose.com/.net/pdf-component.aspx

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


  • Sign In to post your comments