0

Hi all

i am facing one problrm in web based application as i have more experiance in windows base application so anybody hase idea please reply as soon as posible

i wan't the first page of pdf need to convert into jpeg file thata i have done the problem is that i have image control on my web form and i am creating dynamic image in my code (By thirdParty Dll) and want to assign that image to my image control which i have placed on web form dynamically i am sending my code here so please go through it and reply asap Thanks in advance

protected void Button1_Click(object sender, EventArgs e)
    {
        
        Result.Text = "Converting ...";
        string sourcePdf = @"F:\Hiren New Machine\asp.pdf";
        
        byte[] bytes = System.IO.File.ReadAllBytes(sourcePdf);
        SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
        f.OpenPdf(bytes);

        if (f.PageCount > 0)
        {
            //Let's convert 1st page from PDF document
            byte[] image = f.ToImage(System.Drawing.Imaging.ImageFormat.Jpeg, 1,1000);
            System.Drawing.ImageConverter ic = new System.Drawing.ImageConverter();
            System.Drawing.Image img= (System.Drawing.Image)ic.ConvertFrom(image);
        }
1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by hirenpatel53
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.