{"id":9656,"date":"2016-11-09T10:12:23","date_gmt":"2016-11-09T09:12:23","guid":{"rendered":"http:\/\/www.highcharts.com\/blog\/?p=9656"},"modified":"2026-01-12T09:11:41","modified_gmt":"2026-01-12T09:11:41","slug":"247-introducing-offline-pdf-exporting","status":"publish","type":"post","link":"https:\/\/www.highcharts.com\/blog\/news\/247-introducing-offline-pdf-exporting\/","title":{"rendered":"Introducing Offline PDF Exporting"},"content":{"rendered":"<p>Highcharts have been featuring offline support for some time, but only for PNGs, JPEGs, and SVGs. Today we introduce offline exporting for PDFs.<\/p>\n<p dir=\"ltr\">Client side exporting, i.e., the ability to export charts directly in your browser, has been available in Highcharts as a module for some time now. By just adding three scripts to your code, you\u2019ll be exporting charts locally in a jiffy.<\/p>\n<p dir=\"ltr\">Modern browser provides the underlying functionality to make this happen. Chrome, Firefox, and Opera are browsers lets the users run web applications and scripts offline. These modern browsers support saving HTML5 canvas content directly, which allows us to convert the content of an SVG (Scalable Vector Graphics) to canvas. This gives you the ability to export our SVG charts locally in your browser instead of having to send a request to a server. The benefits are manifold:<\/p>\n<ul>\n<li dir=\"ltr\">\n<p dir=\"ltr\">You save the money, time, and headache if running your own export server.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">You don\u2019t have to worry about exposing sensitive data when sending requests to other servers.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">It\u2019s fast.<\/p>\n<\/li>\n<\/ul>\n<p dir=\"ltr\">However, older browsers, like Internet Explorer 9, does not support this. However, not to worry. For older browsers, the exporting module will fall back to the public online export module and will redirect your request to the Highcharts server. (I.e. leave the headache to us). A list of browser support can be found <a href=\"https:\/\/www.highcharts.com\/docs\/export-module\/client-side-export\">here<\/a>.<\/p>\n<h2 dir=\"ltr\">INTRODUCING OFFLINE PDF EXPORT<\/h2>\n<p dir=\"ltr\">PDF has not been a supported format in the offline-exporting module until now. Highcharts offline PDF exporting is made with yWorks\u2019 libraries svg2pdf and jsPDF. \u00a0This German company specializes in data visualization of diagrams and networks for cross-platform Java, .NET-platforms and web applications. yWorks open sourced their projects svg2pdf and jsPDF for converting svgs to pdfs.<\/p>\n<p dir=\"ltr\">The chart you export will be processed by the svg2pdf module, which makes a copy of your the Highcharts-generated SVG. Svg2pdf prepares the SVG for the jsPDF module that create the actual PDF document.<\/p>\n<h2 dir=\"ltr\">HOW DO I INSTALL AND USE IT?<\/h2>\n<ol>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Include the following scripts in your code:<br class=\"kix-line-break\" \/>&lt;script src=&#8221;\/https:\/\/code.highcharts.com\/highcharts.js&#8221;&gt;&lt;\/script&gt;<br class=\"kix-line-break\" \/>&lt;script src=&#8221;\/https:\/\/code.highcharts.com\/modules\/exporting.js&#8221;&gt;&lt;\/script&gt;<br class=\"kix-line-break\" \/>&lt;script src=&#8221;\/https:\/\/code.highcharts.com\/modules\/offline-exporting.js&#8221;&gt;&lt;\/script&gt;<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Configure your chart.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">You\u2019re done. \u00a0Test it by clicking the hamburger menu in the top right corner.<\/p>\n<\/li>\n<\/ol>\n<p dir=\"ltr\">Offline-exporting.js has a dependency on the standard Highcharts exporting module, so don\u2019t forget to include the exporting.js script too. It\u2019s really easy. Check out this <a href=\"https:\/\/jsfiddle.net\/gh\/get\/jquery\/1.11.0\/highslide-software\/highcharts.com\/tree\/master\/samples\/highcharts\/exporting\/offline-download\/\" target=\"_blank\" rel=\"noopener noreferrer\">live demo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know that you can export your chart to PDF offline? Learn more in this article.<\/p>\n","protected":false},"author":22,"featured_media":10607,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"meta_title":"","meta_description":"","hc_selected_options":[],"footnotes":""},"categories":[211],"tags":[1094],"coauthors":[712],"class_list":["post-9656","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-highcharts-core"],"_links":{"self":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/9656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/comments?post=9656"}],"version-history":[{"count":1,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/9656\/revisions"}],"predecessor-version":[{"id":29079,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/9656\/revisions\/29079"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media\/10607"}],"wp:attachment":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media?parent=9656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/categories?post=9656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/tags?post=9656"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/coauthors?post=9656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}