0
我發現呈現FlowDocument的WPF RichTextBox不是所見即所得。WPF RichTextBox字體間距不一致
下面的屏幕截圖顯示編輯器(左)與其渲染的PDF輸出(右)相比縮小了間距。
該文檔的XAML。
<ns0:FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ns0="http://schemas.microsoft.com/xps/2005/06"
Background="#FFFFFFFF" ColumnWidth="816" PageWidth="816" PageHeight="1056"
AllowDrop="True" NumberSubstitution.CultureSource="User">
<ns0:FlowDocument.Blocks>
<ns0:Paragraph>
<ns0:Paragraph.Inlines>
<ns0:Run Text="72" FontFamily="Arial" FontSize="72" />
</ns0:Paragraph.Inlines>
</ns0:Paragraph>
<ns0:Paragraph>
<ns0:Paragraph.Inlines>
<ns0:Run Text="48" FontFamily="Arial" FontSize="48" />
</ns0:Paragraph.Inlines>
</ns0:Paragraph>
<ns0:Paragraph>
<ns0:Paragraph.Inlines>
<ns0:Run Text="20" FontFamily="Arial" FontSize="20" />
</ns0:Paragraph.Inlines>
</ns0:Paragraph>
<ns0:Paragraph>
<ns0:Paragraph.Inlines>
<ns0:Run Text="12" FontFamily="Arial" FontSize="12" />
</ns0:Paragraph.Inlines>
</ns0:Paragraph>
<ns0:Paragraph>
<ns0:Paragraph.Inlines>
<ns0:Run Text="08" FontFamily="Arial" FontSize="8" />
</ns0:Paragraph.Inlines>
</ns0:Paragraph>
</ns0:FlowDocument.Blocks>
</ns0:FlowDocument>
您是否有解決此問題的解決方法?