Skip to content

Watermarking images

Pratham Dave

Asked Oct 16, 2012, 1:31 AM EDT1 answer
Share
LinkedInX
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.


Java
        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,

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    thanks for sharing! I use an imaging sdk which can create watermark found on the internet . Install it and it becomes a selectable processing option.Then you can create watermark in your image in any program at all, including Adobe Acrobat . Just open the images, select watermarkl,and follow the setps given in the sdk, the task will be finished in several seconds. if you haven´t found a good choice , you can have a try. best wishes.
    0