locked
i need to set column width small in pdfjs libray RRS feed

  • Question

  • User81789783 posted

    i have below code

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm7.aspx.cs" Inherits="JqueryHell.WebForm7" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
         <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
          <script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
         <script src="print.min.js"></script>
        <link href="print.min.css" rel="stylesheet" />
        <script src="Scripts/jspdf.js"></script>
        <script src="Scripts/jspdf.plugin.from_html.js"></script>
        <script src="Scripts/jspdf.plugin.split_text_to_size.js"></script>
        <script src="Scripts/jspdf.plugin.standard_fonts_metrics.js"></script>
        <script src="Scripts/jspdf.min.js"></script>
        <script src="Scripts/jspdf.plugin.autotable.js"></script>
        <script>
            function generate() {
    
                var doc = new jsPDF('l', 'pt');
    
                var res = doc.autoTableHtmlToJson(document.getElementById("basic-table")); 
              //  doc.autoTable(res.columns, res.data, { margin: { top: 80 } });
    
                var header = function (data) {
                    doc.setFontSize(10);
                   
                    doc.setTextColor(255, 255, 255);
                    doc.setFontStyle('bold');
                    doc.setFillColor(110, 214, 84);
                 
                   // doc.
                    
                    //doc.addImage(headerImgData, 'JPEG', data.settings.margin.left, 20, 50, 50);
                 //   doc.text("Testing Report", data.settings.margin.left, 50);
                };
              
    
                var options = {
                   
                    beforePageContent: header,
                    margin: {
                        top: 3,
                        
                    },
                   
                  //  startY: doc.autoTableEndPosY() + 20
                };
    
                doc.autoTable(res.columns, res.data, options);
    
                doc.save("table.pdf");
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
       <button onclick="generate()">Generate PDF</button>
    
    <table id="basic-table" style="display: block;">
      <thead style="background:lightgrey;  border-spacing: initial; border-spacing: 0px;">
            <tr style="border: 1px solid black;border-collapse:collapse">
             <th style="border: 1px solid black;border-collapse:collapse">Frequency</th>
             <th style="max-width:8rem;min-width:5rem">Task Name</th>
             <th style="min-width:1rem;border: 1px solid black;border-collapse:collapse">Shift</th>
             <th style="border: 1px solid black;border-collapse:collapse">Range</th>
               <% for (int i = 1; i <= 31; i++)   {  %>
    
                 <th  style="border: 1px solid black;border-collapse:collapse"><%= i %></th>
    
                   <% }  %>
            </tr>
                    </thead>
      <tbody  style="border: 1px solid black;border-collapse:collapse">
                  <tr style="border-spacing: 0rem 0rem;border: 1px solid black;border-collapse:collapse">
                       <td  style="border: 1px solid black;border-collapse:collapse;text-align:center" >Daily</td>
                      <td style="max-width:8rem;border: 1px solid black;border-collapse:collapse">Check the Temperature of instrument</td>
                       <td style="min-width:1rem;text-align:center;border: 1px solid black;border-collapse:collapse">
                        <table style="border: 1px solid black;border-collapse:collapse">
                         <tr style="border: 1px solid black;border-collapse:collapse">
                      <td style="min-width:1rem;border: 1px solid black;border-collapse:collapse">1st</td>
                        </tr>
                        <tr style="border-collapse:collapse">
                            <td style="min-width:1rem;border: 1px solid black;border-collapse:collapse">2nd</td>
                        </tr>
                         <tr style="border-collapse:collapse">
                            <td style="min-width:1rem;border: 1px solid black;border-collapse:collapse">3rd</td>
                        </tr>
                    </table>
                </td>
                                  <td style="text-align:center;border: 1px solid black;border-collapse:collapse">
                     <table style="border: 1px solid black;border-collapse:collapse">
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">&nbsp</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">3-10</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">&nbsp</td>
                        </tr>
                    </table>
                </td>
                    
                      <td>
                           <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr style="border: 1px solid black;border-collapse:collapse">
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
    
                  </tr>
                    <tr style="border: 1px solid black;border-collapse:collapse">
                       <td  style="border: 1px solid black;border-collapse:collapse;text-align:center" >Daily</td>
                      <td style="max-width:8rem;border: 1px solid black;border-collapse:collapse">Check the Pressure Applied to the probe</td>
                       <td style="text-align:center;border: 1px solid black;border-collapse:collapse">
                        <table style="border: 1px solid black;border-collapse:collapse">
                         <tr style="border: 1px solid black;border-collapse:collapse">
                      <td style="border: 1px solid black;border-collapse:collapse">1st</td>
                        </tr>
                        <tr style="border: 1px solid black;border-collapse:collapse">
                            <td style="border: 1px solid black;border-collapse:collapse">2nd</td>
                        </tr>
                         <tr style="border: 1px solid black;border-collapse:collapse">
                            <td style="border: 1px solid black;border-collapse:collapse">3rd</td>
                        </tr>
                    </table>
                </td>
                        <td style="border: 1px solid black;border-collapse:collapse">
                     <table style="border: 1px solid black;border-collapse:collapse">
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">&nbsp</td>
                        </tr>
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">150-1000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">&nbsp</td>
                        </tr>
                    </table>
                </td>
                    
                      <td>
                           <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td><table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                       <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                     <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
                      <td>  <table style="border: 1px solid black;border-collapse:collapse">
                       
                        <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                           <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                         <tr>
                            <td style="border: 1px solid black;border-collapse:collapse">10000</td>
                        </tr>
                    </table></td>
    
                  </tr>
       </tbody>
    </table>
        </form>
    </body>
    </html>
    

    i need to set column width and header width as i have 35 columns as shown below and i want to show on full screen oon landsapces ,how can  i ??

    Monday, August 26, 2019 3:11 PM

Answers

  • User665608656 posted

    Hi erum,

    i need to set column width and header width as i have 35 columns as shown below and i want to show on full screen oon landsapces ,how can  i ??

    To set column width and header width , you can set columnStyles in your options.

    You can refer to this link : https://stackoverflow.com/a/38790312

    Changing the Column Width

    And if you want to set the table full of the pdf, you can set margin of left and right as follow:

         var options = {
                   
                    beforePageContent: header,
                    margin: {
                        top: 0,
                        left:0,
                        right:0,
                    },
                    columnStyles: {
    0: {columnWidth: 5},
    1: {columnWidth: 5},
    //etc...}
                  //  startY: doc.autoTableEndPosY() + 20
                };

    Best Regards,

    YongQing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 27, 2019 5:51 AM