Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

Printing and Formatting in silverlight 5

$
0
0

I am using SIlverlight 5 for showing some controls in aspx page

Unitl this day we have been using Silverlight 5's Print Document class to print and the report looks good.

But when the user prints multiple pages, it sometimes prints blank pages, unexpected error and gets confused with page numbers

When I researched the internet, I got the impression that it is related to print driver or 32 bit machines. The client does not want to upgrade!!! They seemed to tell us that it worked in the version before silverlight 5. 

In the working version we were not using PrintDocument, Instead we were using Htmlpage.window.eval("window.Print()");

After upgrading to 5, I changed the print code to use the sameHtmlpage.window.eval("window.Print()");

But the two outcomes (printdocument and Htmlpage.window.eval("window.Print()");) differ. One of them shows the aspx page name 

Page.xaml.cs 

    private HtmlDocument        m_HtmlDoc;
        private HtmlElement         m_PrintReport;
        private HtmlElement         m_Div;
        private HtmlElement         m_Table;
        private HtmlElement         m_TR;
        private HtmlElement         m_TD;
            this.m_HtmlDoc = HtmlPage.Document;
            this.m_PrintReport = this.m_HtmlDoc.GetElementById( "printReport" );     private void btnPrint_Click( object sender, RoutedEventArgs e )
        {
           

Any ideas on how to proceed


sunDisplay



Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>