本文介绍了的基础上计算可用宽度和字体文字高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都在从数据库中动态创建PDF文档使用 PDFsharp

我需要知道计算文本区域的基于高度的最佳方式所用的字体和可用宽度

我需要知道的高度,以便在需要时我可以处理分页符。

解决方案

右,但使用PDFsharp当你调用XGraphics.MeasureString。

We are creating PDF documents on the fly from the database using PDFsharp.

I need to know the best way to calculate the height of the text area basedon the font used and the available width.

I need to know the height so I can process page breaks when required.

解决方案

Right, but when using PDFsharp you call XGraphics.MeasureString.

这篇关于的基础上计算可用宽度和字体文字高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 07:56
查看更多