Answered by:
Vector Printing

Question
-
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,
.NET Software developer for industrial internet and automation system.
Tuesday, December 10, 2013 5:39 PM
Answers
-
Hi Igor,
If you are trying exporting PDF in Silverlight, I'd like to suggest you to refer to sample below:
Print/Export to PDF from Silverlight
http://silverlightpdf.codeplex.com/
In addition, the issue is more related to the printer than Silverlight according to your description, you may contact printer support for more help.
If you need further assistance, please let me know.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Yunjie Pei - MSFT Tuesday, December 17, 2013 9:52 AM
- Marked as answer by Igor Kondrasovas Tuesday, December 17, 2013 10:45 AM
Monday, December 16, 2013 1:44 AM
All replies
-
Hi Igor,
>>I am trying both "CutePDF Writer" and "Foxit Reader PDF Printer" to print the document in my devenv
Did it appear printing option when you click the button? Do you mean to print .pdf file? I am not clear about the meaning. Could you please explain more to us?
In addition, there is an article about Silverlight Vector Printing below and you may refer to it.
Silverlight 5: Vector and Bitmap Printing for Reports and more
http://10rem.net/blog/2011/06/11/silverlight-5-vector-and-bitmap-printing-for-reports-and-more
Hope it helps.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Thursday, December 12, 2013 11:18 AM -
Hello Yunjie, Thank you for the reply back. You are correct. I do get the print options dialog box where I can find all the printers connected to my PC among with those two "PDF printer drivers" I mentioned. When I print directly to a physical printer, things are fine. But when I print the document using a PDF printer driver the quality is very low, like if the content was rasterized. Is this a bad PDF printer driver? Either way, I decided for now to keep generating documents on the server side instead of allowing client printing. Thank you, Igor.
.NET Software developer for industrial internet and automation system.
Friday, December 13, 2013 11:06 PM -
Hi Igor,
If you are trying exporting PDF in Silverlight, I'd like to suggest you to refer to sample below:
Print/Export to PDF from Silverlight
http://silverlightpdf.codeplex.com/
In addition, the issue is more related to the printer than Silverlight according to your description, you may contact printer support for more help.
If you need further assistance, please let me know.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Yunjie Pei - MSFT Tuesday, December 17, 2013 9:52 AM
- Marked as answer by Igor Kondrasovas Tuesday, December 17, 2013 10:45 AM
Monday, December 16, 2013 1:44 AM