SilverlightShow: Advanced printing in Silverlight Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: Advanced printing in Silverlight <p>Hi Jonathan,</p> <p> Is it possible to implement the 'Page Setup' concept like margin alignment before sending it for printing?</p> <p></p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment6368 Paran http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Fri, 22 Jul 2011 17:43:47 GMT RE: Advanced printing in Silverlight <p>Hi Jonatthan! Great article! Many thanks for sharing!</p> <p><a href="http://oschrome.pl/">Chrome OS</a></p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment6242 Fillipe http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Tue, 31 May 2011 14:10:12 GMT RE: Advanced printing in Silverlight 4 <p>My solution of fit-to-page Silverlight printing:</p> <p><a href="http://jacekjura.blogspot.com/2010/11/silverlight-printing-fit-to-page.html" target="_blank">Silverlight printing: fit-to-page.</a></p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment4979 Jacek Jura http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Tue, 30 Nov 2010 09:39:52 GMT RE: Advanced printing in Silverlight 4 <p>Hi SC Vinod,</p> <p>You could use the same approach to also account for the width of the page. It's more complex. You would first have to make sure you only display the columns you can fit on the page and then adjust for the amount of records. Then on the second page, you would print the same records, but you would have to print different columns. Then on the third page (assuming it would fit on two pages) you would print the second set of records showing the first batch of columns, etc..</p> <p>It's the same approach, only more complex, because you have the same thing twice, but now impacting each other.</p> <p>HTH.</p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment4035 mrjvdveen http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Thu, 22 Jul 2010 09:26:26 GMT RE: Advanced printing in Silverlight 4 <p>Hi Jonathan,</p> <p>                  Thanks a ton for your reply. I got some ideas on how to print my datagrid. Now the issue that I'm facing is my DataGrid is too wide in width so only 60% of the width of my DataGrid is getting printed. If the height is the problem while printing we can remove the last record and set HasMorePages = true, but what can we do if the width of the page is greater than the width of the PrintableArea? </p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment4034 SC Vinod http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Thu, 22 Jul 2010 09:20:37 GMT RE: Advanced printing in Silverlight 4 <p>@SC Vinod: The approach I demonstrated above is exactly what you need. Just replace the bodyTextBlock in the PrintPage for a DataGrid and remove the footerTextBlock. Then instead of adding text to the bodyTextBlock you should databind a new datasource to the DataGrid and keep adding records until the PrintPage no longer fits on paper and then remove the last record. </p> <p>Keep track of what record you added last and you can continue on the next page. It's really the same algorithm, just with slightly different ingredients.</p> <p>HTH. If you have questions, just let us know.</p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment4021 mrjvdveen http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Wed, 21 Jul 2010 09:31:44 GMT RE: Advanced printing in Silverlight 4 <p>Hi Jonathan,</p> <p>                    I need to print a very long Silverlight DataGrid....When I use PrintDocument Only half of the DataGrid is getting printed... Can you please suggest me a solution....I also need to add a header to my datagrid getting printed. Thanks in advance.</p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment4019 SC Vinod http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Wed, 21 Jul 2010 08:15:00 GMT RE: Advanced printing in Silverlight 4 <p>@Ethan: Wow, you must be eager for an answer :-).</p> <p>Unfortunately there is no way to set the page layout (yet?). A security consideration, perhaps?</p> <p>@Balaji: I'm not sure what you mean, but you can adjust this approach to fit most needs. It's simply a way of preventing a page overload and making sure everything is printed.</p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3984 mrjvdveen http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Tue, 13 Jul 2010 09:40:10 GMT RE: Advanced printing in Silverlight 4 Is there a way to set page layout t landscape? http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3977 Ethan http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Mon, 12 Jul 2010 22:17:29 GMT RE: Advanced printing in Silverlight 4 Excellent example. Just what I was looking for, creating a custom printing template and use it to print multiple pages. Thank you very much http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3969 Vishal http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Sat, 10 Jul 2010 19:09:13 GMT RE: Advanced printing in Silverlight 4 <p>hi jonathon </p> <p>Can it be possible to impolement this logic for the xaml with </p> <p>panel bar inside the Grid with many rows and Columns.</p> <p>Can you pls get back </p> <p>Thanks</p> <p>Regards</p> <p>N.Balaji</p> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3826 Balaji http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Mon, 21 Jun 2010 07:43:54 GMT RE: Advanced printing in Silverlight 4 Really nice, just what I was looking for.  Thanks! http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3744 Chris Bordeman http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Wed, 09 Jun 2010 07:34:47 GMT RE: Advanced printing in Silverlight 4 <em>Wow!</em> http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx#comment3637 Marnei http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx Wed, 19 May 2010 16:54:50 GMT