{"id":201836,"date":"2013-11-12T12:09:03","date_gmt":"2013-11-12T08:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=201836"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=201836","title":{"rendered":"<span class=\"post_title\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f PDF \u0438\u0437 WPF-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u00ab\u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u0434\u0430\u0440\u043e\u043c, \u0438 \u043f\u0443\u0441\u0442\u044c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0443\u0439\u0434\u0435\u0442 \u043e\u0431\u0438\u0436\u0435\u043d\u043d\u044b\u0439\u00bb<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 PDF. <br \/>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044f, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a WPF UI, \u0441\u0440\u0430\u0437\u0443 \u0431\u044b\u043b \u043f\u0440\u043e\u0442\u0438\u0432 \u0441\u0443\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 PDF \u0432 \u043a\u043e\u0434\u0435 C#. <br \/>  \u0418 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0431\u044b\u043b \u043d\u0435\u043f\u0440\u043e\u0442\u0438\u0432 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430 \u0438\u0437 HTML \u0432 PDF, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. <br \/>  \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 HTML-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f DotLiquid \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 PDF \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u0432. <br \/>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0441\u0430\u0434\u0430 \u2014 \u043f\u043b\u043e\u0445\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c HTML \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. <br \/>  \u0422\u043e\u043b\u044c\u043a\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043a\u0430\u043f\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 <a href=\"http:\/\/www.nathanpjones.com\/wp\/2013\/03\/output-to-pdf-in-wpf-for-free\/\">\u0441\u0442\u0430\u0442\u044c\u044e \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c<\/a>. <br \/>  \u0418\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c PDF \u0438\u0437 XPS-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (\u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 WPF FlowDocument). <br \/>  \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 PDFSharp.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/github.com\/homoluden\/WPF2PDF\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 GitHub<\/a>.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/h4>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0412\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u0430\u0436\u0430\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0435\u0439, \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u043c \u0431\u044b \u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u00abCode Behind\u00bb \u043f\u043e\u0434\u0445\u043e\u0434. \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0435\u0449\u0435 \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u0441\u0443\u0442\u0438, \u0442.\u0435. \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 PDF. \u0414\u0443\u043c\u0430\u044e \u0432\u044b \u043b\u0435\u0433\u043a\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u0412\u044b \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <b>dynamic<\/b> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 DotLiquid. \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. <a href=\"https:\/\/github.com\/formosatek\/dotliquid\/wiki\/DotLiquid-for-Developers\">\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 DotLiquid<\/a> \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0412\u0430\u0448\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435. \u0422\u0443\u0442 \u0412\u044b \u0442\u043e\u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<br \/>  \u041d\u0443 \u0438 \u0435\u0449\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0443 PDFSharp \u043c\u043d\u043e\u0439 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0441\u0435\u0432\u0434\u043e-\u0448\u0440\u0438\u0444\u0442\u0430\u043c\u0438 FlowDocument \/ XPS. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u043d\u0435\u043d\u0443\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u0437 XPS \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0440\u0443\u044e\u0442\u0441\u044f \u0432 PDF \u0432 \u0432\u0438\u0434\u0435 \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a\u043e\u0432. \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u0435\u0431\u0430\u0433\u0430 \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f Debug.Assert(&#8230;) \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \/ \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0440\u0438\u0444\u0442\u043e\u0432. \u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h4>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439:  <\/p>\n<ul>\n<li> \u0418\u0434\u0435\u043c \u043d\u0430 <a href=\"http:\/\/www.nathanpjones.com\/wp\/2013\/03\/output-to-pdf-in-wpf-for-free\/\">\u0441\u0430\u0439\u0442 \u043f\u0440\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 PDFSharp<\/a> \u0438 \u043a\u0430\u0447\u0430\u0435\u043c \u043e\u0442\u0442\u0443\u0434\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043b\u0438\u0431\u043e \u0441\u0430\u043c\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438. \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c PDFSharp \u0432\u0435\u0440\u0441\u0438\u0439 1.2 \u2014 1.31, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/li>\n<li> \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 DotLiquid (\u0432\u0435\u0440\u0441\u0438\u044f 1.7.0 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NuGet (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 Nuget, \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e)<\/li>\n<li> \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 <b>System.Printing<\/b> \u0438 <b>ReachFramework<\/b> \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f PDF<\/li>\n<\/ul>\n<h4>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e<\/h4>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430.  <\/p>\n<pre><code class=\"xml\">&lt;Window x:Class=&quot;Solution.MainWindow&quot;         xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot;         xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;         Title=&quot;MainWindow&quot; Height=&quot;480&quot; Width=&quot;640&quot;&gt;     &lt;Grid&gt;         &lt;Grid.RowDefinitions&gt;             &lt;RowDefinition&gt;&lt;\/RowDefinition&gt;             &lt;RowDefinition Height=&quot;Auto&quot;&gt;&lt;\/RowDefinition&gt;         &lt;\/Grid.RowDefinitions&gt;         &lt;FlowDocumentReader x:Name=&quot;DocViewer&quot;&gt;             &lt;FlowDocument&gt;                 &lt;FlowDocument.Resources&gt;                     &lt;Style TargetType=&quot;TextBlock&quot;&gt;                         &lt;Setter Property=&quot;FontSize&quot; Value=&quot;14&quot;\/&gt;                         &lt;Setter Property=&quot;Margin&quot; Value=&quot;5&quot;\/&gt;                     &lt;\/Style&gt;                 &lt;\/FlowDocument.Resources&gt;                 &lt;BlockUIContainer&gt;                     &lt;Grid&gt;                         &lt;Grid.ColumnDefinitions&gt;                             &lt;ColumnDefinition Width=&quot;Auto&quot;\/&gt;                             &lt;ColumnDefinition Width=&quot;Auto&quot;\/&gt;                             &lt;ColumnDefinition \/&gt;                         &lt;\/Grid.ColumnDefinitions&gt;                          &lt;Ellipse Fill=&quot;#003481&quot; Width=&quot;5&quot; Height=&quot;5&quot; Margin=&quot;5&quot;\/&gt;                                                  &lt;TextBlock Text=&quot;Title&quot; FontWeight=&quot;Bold&quot; Grid.Column=&quot;1&quot;\/&gt;                          &lt;TextBlock Text=&quot;Description&quot; Grid.Column=&quot;2&quot;\/&gt;                     &lt;\/Grid&gt;                 &lt;\/BlockUIContainer&gt;             &lt;\/FlowDocument&gt;         &lt;\/FlowDocumentReader&gt;                  &lt;StackPanel Grid.Row=&quot;1&quot; Orientation=&quot;Horizontal&quot;&gt;             &lt;Button Click=&quot;ParseButton_OnClick&quot;&gt;Parse&lt;\/Button&gt;             &lt;Button Click=&quot;ButtonBase_OnClick&quot;&gt;Print&lt;\/Button&gt;         &lt;\/StackPanel&gt;              &lt;\/Grid&gt; &lt;\/Window&gt; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c <b>FlowDocumentReader<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u0439 FlowDocument. \u0412 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u044b\u0439 FlowDocument, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0432 Visual Studio.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044b \u0438 \u0441\u0442\u0438\u043b\u0438 WPF. \u0412 \u044d\u0442\u043e\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u0431\u043e\u043d\u0443\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f FlowDocument \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 PDF. \u042f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044b \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0442\u0438\u043b\u0435\u0439 \u0441\u0432\u043e\u0435\u0433\u043e WPF \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0441 HTML \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 CSS \u0441\u0442\u0438\u043b\u0435\u0439 \u0438 \u043a\u0443\u0441\u043a\u043e\u0432 HTML, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0435 \u043a\u0430\u043a-\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d.<\/p>\n<h4>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/h4>\n<p>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 Code Behind \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 DotLiquid.Hash \u0434\u043b\u044f dynamic-\u043e\u0431\u044a\u0435\u043a\u0442\u0430.  <\/p>\n<pre><code>        private DotLiquid.Hash CreateDocumentContext()         {             var context = new             {                 Title = &quot;Hello, Habrahabr!&quot;,                 Subtitle = &quot;Experimenting with dotLiquid, FlowDocument and PDFSharp&quot;,                 Steps = new List&lt;dynamic&gt;{                     new { Title = &quot;Document Context&quot;, Description = &quot;Create data source for dotLiquid Template&quot;},                     new { Title = &quot;Rendering&quot;, Description = &quot;Load template string and render it into FlowDocument markup with Document Context given&quot;},                     new { Title = &quot;Parse markup&quot;, Description = &quot;Use XAML Parser to prepare FlowDocument instance&quot;},                     new { Title = &quot;Save to XPS&quot;, Description = &quot;Save prepared FlowDocument into XPS format&quot;},                     new { Title = &quot;Convert XPS to PDF&quot;, Description = &quot;Convert XPS to WPF using PDFSharp&quot;},                 }             };                          return DotLiquid.Hash.FromAnonymousObject(context);         } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440\u0435, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0443 \u0412\u0430\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u0438\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 DTO \u0438\u043b\u0438 ViewModel.<br \/>  \u0412 \u043c\u0430\u043d\u0443\u0430\u043b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 <a href=\"https:\/\/github.com\/formosatek\/dotliquid\/wiki\/DotLiquid-for-Developers\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 DotLiquid<\/a> \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0412\u044b \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u0442\u0435 \u0432\u044b\u0432\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u044a\u0435\u043a\u0442\u0430 DateTime, \u0442\u043e \u0432 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434 ToString() \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0410 \u0432\u043e\u0442 \u0435\u0441\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u043f\u043e\u0434\u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0412\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c <i>BlaBlaUser<\/i>, \u0442\u043e DotLiquid \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0418 \u044d\u0442\u043e, \u043a\u0441\u0442\u0430\u0442\u0438, \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u0442.\u043a. \u0412\u044b \u0441\u0440\u0430\u0437\u0443 \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0433\u0434\u0435 \u0412\u044b \u043e\u0448\u0438\u0431\u043b\u0438\u0441\u044c, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d.<\/p>\n<h4>\u0428\u0430\u0431\u043b\u043e\u043d<\/h4>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;FlowDocument xmlns=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&quot; \t\t\t  xmlns:x=&quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&quot;&gt;     &lt;FlowDocument.Resources&gt;       &lt;Style TargetType=&quot;TextBlock&quot;&gt;         &lt;Setter Property=&quot;FontSize&quot; Value=&quot;14&quot;\/&gt;         &lt;Setter Property=&quot;Margin&quot; Value=&quot;5&quot;\/&gt;         &lt;Setter Property=&quot;TextWrapping&quot; Value=&quot;Wrap&quot;\/&gt;       &lt;\/Style&gt;     &lt;\/FlowDocument.Resources&gt;        &lt;Paragraph FontSize=&quot;24&quot;&gt;         &lt;Bold&gt;{{ Title }}&lt;\/Bold&gt;     &lt;\/Paragraph&gt;     &lt;Paragraph FontSize=&quot;16&quot;&gt;         {{ Subtitle }}     &lt;\/Paragraph&gt;     &lt;Paragraph FontSize=&quot;16&quot;&gt;       &lt;Bold&gt;Steps to generate PDF:&lt;\/Bold&gt;     &lt;\/Paragraph&gt;      {% for step in Steps -%}          &lt;BlockUIContainer&gt;         &lt;Grid&gt;           &lt;Grid.ColumnDefinitions&gt;             &lt;ColumnDefinition Width=&quot;Auto&quot;\/&gt;             &lt;ColumnDefinition Width=&quot;Auto&quot;\/&gt;             &lt;ColumnDefinition \/&gt;           &lt;\/Grid.ColumnDefinitions&gt;            &lt;Ellipse Fill=&quot;#003481&quot; Width=&quot;5&quot; Height=&quot;5&quot; Margin=&quot;5&quot;\/&gt;            &lt;TextBlock Text=&quot;{{ step.Title }}&quot; Foreground=&quot;#003481&quot; FontWeight=&quot;Bold&quot; Grid.Column=&quot;1&quot;\/&gt;            &lt;TextBlock Text=&quot;{{ step.Description }}&quot; Grid.Column=&quot;2&quot;\/&gt;         &lt;\/Grid&gt;       &lt;\/BlockUIContainer&gt;        {% endfor -%}  &lt;\/FlowDocument&gt;  <\/code><\/pre>\n<p>  \u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430 \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 DotLiquid \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0435 TextBlock.Text \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a CDATA:  <\/p>\n<pre><code class=\"xml\"> &lt;TextBlock Foreground=&quot;#003481&quot; FontWeight=&quot;Bold&quot; Grid.Column=&quot;1&quot;&gt;     &lt;![CDATA[         {{ step.Title }}     ]]&gt;  &lt;\/TextBlock&gt; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0438\u0442 \u0412\u0430\u0441 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0445 \u0441 XML-\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c.<\/p>\n<h4>\u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 FlowDocument<\/h4>\n<p>  <\/p>\n<pre><code>        private void ParseButton_OnClick(object sender, RoutedEventArgs e)         {             using (var stream = new FileStream(&quot;Templates\\\\report1.lqd&quot;, FileMode.Open))             {                 using (var reader = new StreamReader(stream))                 {                     var templateString = reader.ReadToEnd();                     var template = dotTemplate.Parse(templateString);                     var docContext = CreateDocumentContext();                     var docString = template.Render(docContext);                      DocViewer.Document = (FlowDocument) XamlReader.Parse(docString);                 }             }         } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a \u0444\u0430\u0439\u043b\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 FlowDocument. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e XamlReader&#8217;\u0430 \u043f\u0430\u0440\u0441\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0432 \u043d\u0430\u0448 FlowDocumentReader. \u0415\u0441\u043b\u0438 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 PDF.<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f PDF<\/h4>\n<p>  <\/p>\n<pre><code>        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)         {             using (var stream = new FileStream(&quot;doc.xps&quot;, FileMode.Create))             {                 using (var package = Package.Open(stream, FileMode.Create, FileAccess.ReadWrite))                 {                     using (var xpsDoc = new XpsDocument(package, CompressionOption.Maximum))                     {                         var rsm = new XpsSerializationManager(new XpsPackagingPolicy(xpsDoc), false);                         var paginator = ((IDocumentPaginatorSource)DocViewer.Document).DocumentPaginator;                         rsm.SaveAsXaml(paginator);                         rsm.Commit();                     }                 }                 stream.Position = 0;                              var pdfXpsDoc = PdfSharp.Xps.XpsModel.XpsDocument.Open(stream);                 PdfSharp.Xps.XpsConverter.Convert(pdfXpsDoc, &quot;doc.pdf&quot;, 0);             }                      } <\/code><\/pre>\n<p>  \u0418 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f package XPS-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (\u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, XPS \u2014 \u044d\u0442\u043e zip-\u0430\u0440\u0445\u0438\u0432 c\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c XML \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432). \u041e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0440\u0430\u043d\u0435\u0435 FlowDocument \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 XPS-\u043f\u0430\u043a\u0435\u0442. (\u0414\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f!) \u043f\u043e\u0442\u043e\u043a\u0430 XPS-\u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 XPS-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 PDFSharp. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 XPS \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 PDF.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435.  <\/p>\n<ul>\n<li> \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u0431\u0438\u0437\u043d\u0435\u0441\u0441-\u0437\u0430\u0434\u0430\u0447 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (MIT)<\/li>\n<li> FlowDocument \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u0430 \u2014 \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f WPF \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/li>\n<li> \u0421\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u2014 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e FlowDocument \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 WPF \u0441\u0442\u0438\u043b\u044f\u043c\u0438<\/li>\n<li> \u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u0442.\u043a. \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WPF \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044b, \u0442\u043e \u0434\u043e \u00ab\u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u043a\u0438\u00bb \u0432 PDF \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Binding \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043f\u0440\u0430\u0432\u0434\u0430 \u0435\u0441\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u043d\u0443\u0436\u0435\u043d \u043f\u0438\u043d\u043e\u043a \u0434\u043b\u044f Dispatcher \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f Binding).<\/li>\n<li> Visual Designer \u2014 \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u043c Visual Studio \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u043e\u0440\u0447\u0435\u043d\u0438\u0435 \u2014 \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0438 DotLiquid \u0432\u0438\u0434\u0430 &quot;{{ someProp }}&quot; \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439 XAML. \u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 &quot;{}&quot;: &lt;TextBlock Text=&quot;<b>{}<\/b>{{ step.Title }}&quot; &#8230;\/&gt;<\/li>\n<\/ul>\n<p>  \u0421\u041f\u0410\u0421\u0418\u0411\u041e \u0417\u0410 \u0412\u041d\u0418\u041c\u0410\u041d\u0418\u0415!    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/201836\/\"> http:\/\/habrahabr.ru\/post\/201836\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 PDF. <br \/>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044f, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a WPF UI, \u0441\u0440\u0430\u0437\u0443 \u0431\u044b\u043b \u043f\u0440\u043e\u0442\u0438\u0432 \u0441\u0443\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 PDF \u0432 \u043a\u043e\u0434\u0435 C#. <br \/>  \u0418 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0431\u044b\u043b \u043d\u0435\u043f\u0440\u043e\u0442\u0438\u0432 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430 \u0438\u0437 HTML \u0432 PDF, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. <br \/>  \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 HTML-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f DotLiquid \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 PDF \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u0432. <br \/>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0441\u0430\u0434\u0430 \u2014 \u043f\u043b\u043e\u0445\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c HTML \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 PDF-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. <br \/>  \u0422\u043e\u043b\u044c\u043a\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0437\u0430\u043a\u0430\u043f\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 <a href=\"http:\/\/www.nathanpjones.com\/wp\/2013\/03\/output-to-pdf-in-wpf-for-free\/\">\u0441\u0442\u0430\u0442\u044c\u044e \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c<\/a>. <br \/>  \u0418\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c PDF \u0438\u0437 XPS-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 (\u044d\u0442\u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 WPF FlowDocument). <br \/>  \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 PDFSharp.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/github.com\/homoluden\/WPF2PDF\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 GitHub<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-201836","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/201836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=201836"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/201836\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=201836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=201836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=201836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}