问题
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