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

Vector Printing

$
0
0

Hello,

I am trying to use vector printing in my SL5 application, but the result still seems to be a bitmap, based on the document quality.

I am trying both "CutePDF Writer" and "Foxit Reader PDF Printer" to print the document in my devenv and we can clearly see the document is bitmap based.

Here is the code I'm using to repro the problem. It just print a button on the left top corner of the sheet:

        PrintDocument _document;
        int _currentPage;

        public MainPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            _document = new PrintDocument();
            _currentPage = 0;
            _document.PrintPage += _document_PrintPage;
            //_document.Print("Print", new PrinterFallbackSettings() { ForceVector = true });
            _document.Print("Print");

        }

        void _document_PrintPage(object sender, PrintPageEventArgs e)
        {
            e.PageVisual = new Button() { Width = 100, Height = 100, Content = "Igor" };

            if (_currentPage + 1 < 2)
            {
                _currentPage++;
                e.HasMorePages = true;
            }
        }

Do you know why the vector printing may not be working?

The resulting .PDF can be found at http://sdrv.ms/1cyTabf

Any suggestion?

Thank you,

Igor.


.NET Software developer for industrial internet and automation system.


Viewing all articles
Browse latest Browse all 1083


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