Convert DIV Html5 to Image or PDF C # / Jquery ASP.Net

0

Hello friends, how can I convert a div to an img in C # / ASP.Net?

I want to capture Google maps from an APP in C # ASP.Net

I tried with Windows Forms CopyScreen worse already published in IIS tells me Not Valid Controller

Do you have any ideas?

    
asked by Vicente Davila Muñoz 27.06.2017 в 22:53
source

1 answer

1
Con esta libreria 

    <script type="text/javascript" src="Scripts/jspdf.min.js"></script>

ejemplo: 
tu div

    <div id="areaImprimir">
        tu contenido....
        </div>

la funcion: 

   <script type="text/javascript">
        function genPDF() {
            var pdf = new jsPDF('PageSize.A4, 10f, 10f, 100f, 0f');
            pdf.addHTML($('#areaImprimir'),
                5,
                5,
                function () {
                    pdf.save('div.pdf');
                });
        }
    </script>
    
answered by 13.06.2018 в 19:43