0

I am using iText pdf for generate pdf using asp.net but i not able to get screenshot of div which is on .aspx page. Please share some code or solution.

I want to show this type of div shich contains many aspx controls. My div is-

       <div id="maindiv">
            <asp:Label ID="Label5" runat="server" Text="TOTAL DEDUCTIONS"></asp:Label><br />
            <div style="margin-top: 5px; margin-left: 5px;">
                <asp:TextBox ID="TextBox1" runat="server" CssClass="leftTb" TextMode="Number"
                    Text="0" Width="90%"></asp:TextBox>
            </div>
            <br />

            <div style="display: none;">
                <asp:Label ID="Label7" runat="server" Text="TAXABLE INCOME"></asp:Label><br />
                <div style="margin-top: 5px; margin-left: 5px;">
                    <asp:TextBox ID="TextBox2" runat="server" CssClass="leftTb" TextMode="Number" Text="0"
                        Width="90%" ReadOnly="True"></asp:TextBox>
                </div>
                <br />
            </div>
        </div>
Chris Haas
  • 53,986
  • 12
  • 141
  • 274
  • Obviously you need to feed iText XHTML, not ASP. This means that the ASP code needs to pass through an application server first. – Bruno Lowagie Mar 18 '15 at 14:19
  • how to do that, if you know that process or code then share that code with me plz.. – Praveen Beniwal Mar 19 '15 at 04:58
  • I am not an ASP developer. I'm a Java developer. *You* are the one writing ASP, so you know how to process ASP pages don't you? If not, post another question aimed at ASP developers asking them: *How do I render an ASP script to HTML?* – Bruno Lowagie Mar 19 '15 at 08:33
  • I've just found a question + answer that explains what you don't seem to understand: http://stackoverflow.com/questions/25164257/how-to-convert-html-to-pdf-using-itextsharp – Bruno Lowagie Mar 19 '15 at 17:29

0 Answers0