How To Print Glyph Elements in WinRT

笑着哭i 提交于 2019-12-08 09:56:51

问题


I am trying to print a Canvas with Path, TextBlock and Glyph elements on it, however the Glyphs are excluded in the printed content. This is eerily similar to the exact same problem with Silverlight 5 Vector printing, for which I never found a resolution. Am I missing something or does the same problem exist in WinRT?

As background, I would like to print an XPS document, but as WinRT cannot print one directly, I am creating a Canvas out of each page, which can then be fed to the WinRT printing API. This works A-OK except that the Glyphs are missing, making the whole scheme rather useless.

Any help regarding printing an XPS document, printing Glyphs, or confirmation that neither is possible would be helpful.

Update: It seems that ImageBrush elements are also discarded when the UIElement is sent to the printer.


回答1:


Perhaps you could extract the glyph paths using DirectWrite and print paths instead.




回答2:


Received the following from Microsoft on their MSDN forum:

Hi James, You cannot really print Glyphs in WinRT as yet - you will have to use TextBlocks instead.



来源:https://stackoverflow.com/questions/15776488/how-to-print-glyph-elements-in-winrt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!