1
Reply

watermarking images

Pratham Dave

Pratham Dave

Oct 16 2012 5:31 AM
1.3k
Hello,

I want to develop one online application, which user enter any word (fname,lname) itself on images.
and also that image can be download his/her computers.

e.g
Like online form application.
user fill up online form it self and then his/her download that form.


But,I want fill up the form on image.

I have develop small application.
it's fill the form on one page and then click button then redirect all value to another page on images.
here it's working. but, when I try to export all details with image/pdf so, it's not working, meant it's not download images. 

code for export pdf file.


        Response.ContentType = "application/pdf";
        Response.AddHeader("content-disposition", "attachment;filename=TestPage.pdf");
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        StringWriter sw = new StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);
        this.Page.RenderControl(hw);
        StringReader sr = new StringReader(sw.ToString());
        Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
        HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
        PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
        pdfDoc.Open();
        htmlparser.Parse(sr);

        pdfDoc.Close();
        Response.Write(pdfDoc);
        Response.End();


Thanks,


Answers (1)