{"action":"closed","issue":{"url":"https://api.github.com/repos/MrRio/jsPDF/issues/1470","repository_url":"https://api.github.com/repos/MrRio/jsPDF","labels_url":"https://api.github.com/repos/MrRio/jsPDF/issues/1470/labels{/name}","comments_url":"https://api.github.com/repos/MrRio/jsPDF/issues/1470/comments","events_url":"https://api.github.com/repos/MrRio/jsPDF/issues/1470/events","html_url":"https://github.com/MrRio/jsPDF/issues/1470","id":261857819,"number":1470,"title":"jsPDF generate pdf with multiple pages","user":{"login":"Anastasia-Gorobets","id":21197278,"avatar_url":"https://avatars3.githubusercontent.com/u/21197278?v=4","gravatar_id":"","url":"https://api.github.com/users/Anastasia-Gorobets","html_url":"https://github.com/Anastasia-Gorobets","followers_url":"https://api.github.com/users/Anastasia-Gorobets/followers","following_url":"https://api.github.com/users/Anastasia-Gorobets/following{/other_user}","gists_url":"https://api.github.com/users/Anastasia-Gorobets/gists{/gist_id}","starred_url":"https://api.github.com/users/Anastasia-Gorobets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anastasia-Gorobets/subscriptions","organizations_url":"https://api.github.com/users/Anastasia-Gorobets/orgs","repos_url":"https://api.github.com/users/Anastasia-Gorobets/repos","events_url":"https://api.github.com/users/Anastasia-Gorobets/events{/privacy}","received_events_url":"https://api.github.com/users/Anastasia-Gorobets/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-09-30T17:15:07Z","updated_at":"2018-02-15T01:52:27Z","closed_at":"2018-02-15T01:52:26Z","author_association":"NONE","body":"Hello everybody.\r\nI use these version for jspdf:\r\n`<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.min.js\"></script>\r\n    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js\"></script>`\r\n\r\n I have big div on my page , example of it is:\r\n```\r\n <div id=\"template_invoice\">\r\n    <div id=\"first_head\">\r\n        <div id=\"logo_invoice\" class=\"has-65\">\r\n            <img src=\"\" width=\"280px\">\r\n        </div>\r\n        <div id=\"main_header_info\" class=\"has-35\">\r\n        </div>\r\n    </div>\r\n    <div class=\"clearFix\"></div>\r\n    <div id=\"second_head\">\r\n        <div id=\"lead_address\" class=\"has-65\">\r\n            <span id=\"lead_name\"></span><br>\r\n            <span id=\"lead_street\"></span><br>\r\n            <span id=\"lead_postcode_city\"></span><br>\r\n        </div>\r\n         <div id=\"lead_invoice_info\" class=\"has-35\">\r\n            <div class=\"span_padding_invoice\">\r\n            <span class=\"invoice_main_span\">Rechnungs-Nr.</span>\r\n            <span id=\"lead_rechnungs_nr\" class=\"right-clmn-span\"></span>\r\n            <br>\r\n          ...\r\n                </div>\r\n            <div class=\"span_padding_invoice lead_total_container\">\r\n                <span class=\"invoice_main_span total_bold\">Total</span>\r\n                <span id=\"lead_total\" class=\"right-clmn-span\"></span>\r\n                <br>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div id=\"content_invoice\">\r\n <div id=\"rechnung_div\">\r\n            <h1>Rechnung</h1>\r\n            <p>Rechnungs-Nr. <span id=\"rechnung_nr\"></span> / Kunden-Nr. <span id=\"kunder_nr\"></span> </p>\r\n        </div>\r\n        <table id=\"product_invoice_table\" width=\"100%\">\r\n                <thead>\r\n\t\t\t<tr>\r\n                <th width=\"55%\">Produkt</th>\r\n                <th width=\"15%\">Menge</th>\r\n                <th width=\"15%\">Preis / Einheit</th>\r\n                <th width=\"15%\">Total</th>\r\n            </tr>\r\n\t\t\t</thead>\r\n<tbody>\r\n</tbody>\r\n        </table>\r\n     </div>\r\n    <div class=\"clearFix\"></div>\r\n    <div id=\"footer_invoice\">\r\n    </div>\r\n</div>\r\n```\r\n\r\nSo I generate pdf file using below code:\r\n` \r\n            var doc = new jsPDF('p', 'pt', 'a4');\r\n           doc.addHTML($('#template_invoice')[0],\r\n                    function () {\r\n                        var pdf = doc.output('blob');\r\n      ....\r\n});`\r\n\r\nAll works fine, but if height of cotent is larger then page there are not second,third.. other pages.\r\nI tried use pagesplit:true, but it works wrong, there are not right font,css and instead of 2 pages I get 4 pages with wrong css.\r\n\r\nI need any help to solve this problem, how can I set multiple page for my div?\r\n\r\nThanks very much for help!\r\n\r\nNow I get such pdf with pagesplt flag:\r\n[http://clip2net.com/s/3ObsVZc](url)"}}
{"actor":{"display_login":"arasabbasi"}}