{"id":306,"date":"2010-04-06T00:36:28","date_gmt":"2010-04-06T08:36:28","guid":{"rendered":"http:\/\/www.dhtmlx.com\/blog\/?p=306"},"modified":"2023-05-09T11:35:02","modified_gmt":"2023-05-09T08:35:02","slug":"printing-capabilities-part-1-dhtmlxscheduler","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/printing-capabilities-part-1-dhtmlxscheduler\/","title":{"rendered":"Printing Capabilities. Part 2 &#8211; dhtmlxScheduler."},"content":{"rendered":"<p>About three months ago, we introduced a solution for converting <a href=\"https:\/\/dhtmlx.com\/blog\/printing-grid-content\/\">dhtmlxGrid to PDF<\/a> to provide the ability to print grid content. Now it&#8217;s time to do the same for dhtmlxScheduler, just as we promised. The Scheduler-to-PDF solution is in many ways similar to Grid-to-PDF. This is a stand-alone service that can work independently of the component itself. As with dhtmlxGrid, it requires a server with PHP support.<\/p>\n<p>To try the printing functionality for dhtmlxScheduler right now, <a href=\"https:\/\/dhtmlx.com\/x\/download\/regular\/scheduler-pdf-php.zip\">download this package<\/a>. It contains two folders:<\/p>\n<ul>\n<li><strong>server<\/strong> \u2013 the script of the printing service; should be placed on the PHP server.<\/li>\n<li><strong>client<\/strong> \u2013 client-side script; should be added to the page together with other dhtmlxScheduler .js files.<\/li>\n<\/ul>\n<p>&nbsp;<br \/>\nAfter placing the scripts in the correct locations, you can print the current state of the calendar by calling:<\/p>\n<div class=\"codecolorer-container javascript default codecolorer-noborder\" style=\"\"><div class=\"javascript codecolorer\">scheduler.<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>Here the parameter is an http path to the script of the printing service.<\/p>\n<p>The view of the calendar in PDF will depend on the calendar mode. For instance, for the Month View mode it will look like this:<\/p>\n<div id=\"attachment_313\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-313\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_month_.png\" alt=\"dhtmlxScheduler in PDF. Month View.\" title=\"dhtmlxScheduler in PDF. Month View.\" width=\"570\" height=\"393\" class=\"size-full wp-image-313\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_month_.png 570w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_month_-300x206.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><p id=\"caption-attachment-313\" class=\"wp-caption-text\">dhtmlxScheduler in PDF. Month View.<\/p><\/div>\n<p>\u2026and for the Week View it will have a different look:<\/p>\n<div id=\"attachment_314\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-314\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_week_.png\" alt=\"dhtmlxScheduler in PDF. Week View.\" title=\"dhtmlxScheduler in PDF. Week View.\" width=\"570\" height=\"387\" class=\"size-full wp-image-314\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_week_.png 570w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2010\/04\/pdf_week_-300x203.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><p id=\"caption-attachment-314\" class=\"wp-caption-text\">dhtmlxScheduler in PDF. Week View.<\/p><\/div>\n<p>The current version of dhtmlxScheduler supports printing in Month, Week, Day, Year, and Agenda modes.<\/p>\n<p>The printing service operates with data in Unicode, so the printing should work for any language. (We&#8217;ve tested this functionality with some West European languages and Cyrillic.)<\/p>\n<p>Although a single command is enough to simply print the calendar, this solution provides much more flexibility. You can configure sizes and colors of calendar elements, font sizes, and other parameters. All the technical detail can be found in the <a href=\"https:\/\/docs.dhtmlx.com\/scheduler\/pdf.html\">documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>About three months ago, we introduced a solution for converting dhtmlxGrid to PDF to provide the ability to print grid content. Now it&#8217;s time to do the same for &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3373,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71,1],"tags":[33,18,14,15],"class_list":["post-306","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-uncategorized","tag-all-posts","tag-labs","tag-tips","tag-dhtmlxscheduler"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/306","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=306"}],"version-history":[{"count":1,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":10863,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/306\/revisions\/10863"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3373"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}