{"id":340,"date":"2010-04-23T01:33:10","date_gmt":"2010-04-23T09:33:10","guid":{"rendered":"http:\/\/www.dhtmlx.com\/blog\/?p=340"},"modified":"2025-05-19T14:44:38","modified_gmt":"2025-05-19T11:44:38","slug":"printing-capabilities-part-3-grid-to-pdf-improvements","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/printing-capabilities-part-3-grid-to-pdf-improvements\/","title":{"rendered":"Printing capabilities. Part 3. Grid-to-PDF Improvements."},"content":{"rendered":"<p><strong>UPD: Download the most recent <a href=\"https:\/\/dhtmlx.com\/docs\/products\/goodies\/\">Grid-to-PDF packages for PHP, ASP.NET, and Java<\/a>.<\/strong><\/p>\n<p>As we were developing printing functionality for dhtmlxScheduler, it made sense to incorporate all the new advantages into the existing Grid-to-PDF service, so here we go with Grid-to-PDF v0.2.<\/p>\n<p>The new version of the Grid-to-PDF solution supports Unicode, which means that printing functionality will work for the majority of languages. Other new features include:<\/p>\n<ul>\n<li>Support for multiline text<\/li>\n<li>Support for complex headers in grid<\/li>\n<li>Support for images (column type  &#8220;img&#8221;)<\/li>\n<\/ul>\n<p>&nbsp;<br \/>\nWith the updated Grid-to-PDF service, even tables with a complex structure like this:<\/p>\n<div id=\"attachment_345\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-345\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/grid_to_pdf_1.gif\" alt=\"Grid-to-PDF. HTML page.\" title=\"Grid-to-PDF. HTML page.\" width=\"600\" height=\"401\" class=\"size-full wp-image-345\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/grid_to_pdf_1.gif 600w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/grid_to_pdf_1-300x200.gif 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><p id=\"caption-attachment-345\" class=\"wp-caption-text\">Grid-to-PDF. HTML page.<\/p><\/div>\n<p>\u2026can be exported to the PDF format, which will look like:<\/p>\n<div id=\"attachment_346\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-346\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/grid_to_pdf_2.2.gif\" alt=\"Grid-to-PDF. PDF document.\" title=\"Grid-to-PDF. PDF document.\" width=\"600\" height=\"391\" class=\"size-full wp-image-346\" \/><p id=\"caption-attachment-346\" class=\"wp-caption-text\">Grid-to-PDF. PDF document.<\/p><\/div>\n<p>Now to the practical part. To try the new Grid-to-PDF service, <a href=\"https:\/\/dhtmlx.com\/x\/download\/regular\/grid-pdf-php.zip\">download the new version here<\/a>. Installation of Grid-to-PDF v0.2 is the same as for the previous version. You\u2019ll find two folders in the downloaded package:<\/p>\n<p><strong>.\/server<\/strong> \u2013 put this folder on the server (PHP 5.x required).<br \/>\n<strong>.\/client <\/strong>\u2013 copy files from this folder to the codebase of the grid.<\/p>\n<p>Add extra script on the page:<\/p>\n<div class=\"codecolorer-container html4strict default codecolorer-noborder\" style=\"\"><div class=\"html4strict codecolorer\"><span class=\"sc2\">&lt;<span class=\"kw2\">script<\/span> <span class=\"kw3\">src<\/span><span class=\"sy0\">=<\/span>\u201d.<span class=\"sy0\">\/<\/span><span class=\"kw3\">codebase<\/span><span class=\"sy0\">\/<\/span>dhtmlxgrid_export.js\u201d&gt;<\/span><\/div><\/div>\n<p>And use the <strong>toPDF<\/strong> command on the page as:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"\"><div class=\"javascript codecolorer\">grid.<span class=\"me1\">toPDF<\/span> <span class=\"br0\">&#40;<\/span>\u201chttp<span class=\"sy0\">:<\/span><span class=\"co1\">\/\/some.com\/server\/generate.php\u201d);<\/span><\/div><\/div>\n<p>You\u2019ll find the detailed settings of the printing service (colors, sizes, fonts, etc.) <a href=\"https:\/\/docs.dhtmlx.com\/grid__data_export.html\" target=\"_blank\">in the documentation<\/a>.   <\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPD: Download the most recent Grid-to-PDF packages for PHP, ASP.NET, and Java. As we were developing printing functionality for dhtmlxScheduler, it made sense to incorporate all the new advantages &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3461,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71,1],"tags":[33,18,6,30],"class_list":["post-340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-uncategorized","tag-all-posts","tag-labs","tag-dhtmlxgrid","tag-grid-to-pdf"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=340"}],"version-history":[{"count":3,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions"}],"predecessor-version":[{"id":13920,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/340\/revisions\/13920"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3461"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}