Save PDF ASP.NET C #

1

I want to generate a pdf of a specific div but it does not give me everything I want it to print. I am using jspdf as a library. I pass a fragment of my code

In the aspx:

<script type="text/javascript" src="Scripts/jspdf.min.js"></script>
 <script type="text/javascript">
         function genPDF() {
            var pdf = new jsPDF('p', 'pt', 'a4');
             pdf.addHTML($('#thumbnail'),
                5,
                5,
                function () {
                    pdf.save('div.pdf');
                });
        }
    </script>

The div areaPrint contains other divs that are dynamically filled with QRs, 21 QRs can fit on one page, but I do not print the others anymore if I want to print 60, it is always cut in 21.

  <div id="areaImprimir">
    <div id="PrintQRStudents" runat="server"></div>
         <div id="PrintQRRespuestas" runat="server"></div                
              <div id="PrintQRPuntos" runat="server"></div>
                  </div>

Button:

<a href="javascript:genPDF()" class="btn btn-primary">
                    <i class="fa fa-floppy-o"></i> Guardar Folios QR
                      </a>
    
asked by Tavo Ovalle 19.06.2018 в 19:52
source

0 answers