The annotation toolbar icons don't appear when I run my Win 8.1 project


When I run my Windows 8.1 App, the annotation toolbar icons are missing. I tried Windows 10, and it was fine, and also the PDFNet SDK samples work fine on Win 8.1


It appears the problem is a glitch in Windows 8.1, where because the tools are used in an intermediate project, the resources (custom.ttf) seem to not be accessible at runtime. This same setup works fine on Windows 10, just not on Windows 8.1. This works in our samples, and I suppose most of our customers, because the tools are used directly.

Note, the icons are in the PDFViewCtrlTools project, in Controls → Resources → custom.ttf

Fortunately the tools project is open code for you. The easiest solution would be to create a folder inside the Example.WinRT project called Tools and simply drag all the source code into that project. You will have to manually change the resource paths. The other option is to only move the AnnotationToolbar over, along with the font file.


It appears that you can work around this on Windows 8.1 by explicitly giving the font family to the button (rather than as an implicit style).

Either in Xaml directly (AnnotationToolbar.xaml):

<resources:TabButton x:Name=“AnnotSquareButton” Tag=“square” Content=“” FontFamily=“ms-appx:///pdftron.PDF.Tools/Controls/Resources/custom.ttf#PDFTron Glyphicons”
Command="{Binding ToolButtonClickedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
Style="{Binding CurrentTool, Converter={StaticResource EnumToStyleConverterWithProperties}, ConverterParameter=e_rect_create}"/>

Or in the codebehind (AnnotationToolbar.xaml.cs):

AnnotCircleButton.FontFamily = new FontFamily(“ms-appx:///pdftron.PDF.Tools/Controls/Resources/custom.ttf#PDFTron Glyphicons”);

This should make the glyphs show up, without any other modifications.