• <i id='0o3PX'><tr id='0o3PX'><dt id='0o3PX'><q id='0o3PX'><span id='0o3PX'><b id='0o3PX'><form id='0o3PX'><ins id='0o3PX'></ins><ul id='0o3PX'></ul><sub id='0o3PX'></sub></form><legend id='0o3PX'></legend><bdo id='0o3PX'><pre id='0o3PX'><center id='0o3PX'></center></pre></bdo></b><th id='0o3PX'></th></span></q></dt></tr></i><div id='0o3PX'><tfoot id='0o3PX'></tfoot><dl id='0o3PX'><fieldset id='0o3PX'></fieldset></dl></div>
    • <bdo id='0o3PX'></bdo><ul id='0o3PX'></ul>
    <legend id='0o3PX'><style id='0o3PX'><dir id='0o3PX'><q id='0o3PX'></q></dir></style></legend>

        <small id='0o3PX'></small><noframes id='0o3PX'>

        <tfoot id='0o3PX'></tfoot>

        根据可用宽度和字体计算文本高度?

        Calculate text height based on available width and font?(根据可用宽度和字体计算文本高度?)

              <tbody id='HBVEp'></tbody>
            <legend id='HBVEp'><style id='HBVEp'><dir id='HBVEp'><q id='HBVEp'></q></dir></style></legend>

              <tfoot id='HBVEp'></tfoot>
              <i id='HBVEp'><tr id='HBVEp'><dt id='HBVEp'><q id='HBVEp'><span id='HBVEp'><b id='HBVEp'><form id='HBVEp'><ins id='HBVEp'></ins><ul id='HBVEp'></ul><sub id='HBVEp'></sub></form><legend id='HBVEp'></legend><bdo id='HBVEp'><pre id='HBVEp'><center id='HBVEp'></center></pre></bdo></b><th id='HBVEp'></th></span></q></dt></tr></i><div id='HBVEp'><tfoot id='HBVEp'></tfoot><dl id='HBVEp'><fieldset id='HBVEp'></fieldset></dl></div>
                • <bdo id='HBVEp'></bdo><ul id='HBVEp'></ul>
                • <small id='HBVEp'></small><noframes id='HBVEp'>

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

                  问题描述

                  限时送ChatGPT账号..

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

                  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 based on the font used and the available width.

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

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

                  推荐答案

                  在 .NET 中,您可以调用Graphics.MeasureString 了解如何绘制的文本会变大.

                  In .NET you can call Graphics.MeasureString to find out how large the drawn text is going to be.

                  没错,但是在使用 PDFsharp 时,您调用 XGraphics.MeasureString.

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

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                  CreateDelegate with unknown types(具有未知类型的 CreateDelegate)
                  Does Funclt;Tgt;.BeginInvoke use the ThreadPool?(Funclt;Tgt;.BeginInvoke 使用线程池吗?)
                  How to create a delegate to an instance method with a null target?(如何为具有空目标的实例方法创建委托?)
                    <bdo id='tY49J'></bdo><ul id='tY49J'></ul>

                  • <legend id='tY49J'><style id='tY49J'><dir id='tY49J'><q id='tY49J'></q></dir></style></legend>

                      <tbody id='tY49J'></tbody>

                    <small id='tY49J'></small><noframes id='tY49J'>

                    <tfoot id='tY49J'></tfoot>
                      • <i id='tY49J'><tr id='tY49J'><dt id='tY49J'><q id='tY49J'><span id='tY49J'><b id='tY49J'><form id='tY49J'><ins id='tY49J'></ins><ul id='tY49J'></ul><sub id='tY49J'></sub></form><legend id='tY49J'></legend><bdo id='tY49J'><pre id='tY49J'><center id='tY49J'></center></pre></bdo></b><th id='tY49J'></th></span></q></dt></tr></i><div id='tY49J'><tfoot id='tY49J'></tfoot><dl id='tY49J'><fieldset id='tY49J'></fieldset></dl></div>