1

I have a html string..

<div id="P1">
    <table id="P1Table">
        <tr>
            <td width="50%">
                ABCD: <span style="font-weight:bold;>First</span>
            </td>
            <td width="50%">
                ABCD: <span style="font-weight:bold;>First</span>
            </td>
    </table>
    <table id="Table Two">
        <tr>
            <td class="one">
                First:
            </td>
            <td class="two">
                None
            </td>
        </tr>
        <tr>
            <td class="one">
                First:
            </td>
            <td class="two">
                None
            </td>
        </tr>
        <tr>
            <td class="one">
                First:
            </td>
            <td class="two">
                None
            </td>
        </tr>
        <tr>
    </table>
</div>

This is the text visualizer for a string. This is being displayed on the webpage using a asp literal.

Now here is what I need some help on. I am trying to get the text and formatting (html visualizer) in a pdf report. So any idea on how to do this. If it would be easier to get this info to a dataset and then use reprtviewer to generate the report, how would I get the html text and format to a dataset.

Thanks

Ant P
  • 24,220
  • 5
  • 65
  • 105
user575219
  • 2,262
  • 12
  • 51
  • 99

2 Answers2

1

Pechkin is a .NET wrapper over the fairly well-regarded standalone HtmlToPdf. This can be used to do what you require.

Ant P
  • 24,220
  • 5
  • 65
  • 105
0

you can use iTextSharp to convert html to pdf. take a look at this answer.

Community
  • 1
  • 1
sazary
  • 806
  • 1
  • 7
  • 18