![](/img/trans.png)
[英]Syncfusion : Using a Google Font for the page number in html to pdf
[英]How to get the remaining page size using syncfusion pdf
我們可以使用PdfLayoutResult來獲取PDF文檔頁面中的空白區域。 請參考下面的代碼片段以獲取更多詳細信息,
C#:
//Create a text element with the text and font
PdfTextElement textElement = new PdfTextElement(text, font);
PdfLayoutFormat layoutFormat = new PdfLayoutFormat();
layoutFormat.Layout = PdfLayoutType.Paginate;
//Draw the paragraph
PdfLayoutResult result = textElement.Draw(page, new RectangleF(0, 0,
page.GetClientSize().Width, page.GetClientSize().Height), layoutFormat);
//Get the blank space of PDF using PdfLayoutResult and page height
float blankSpaceHeight = page.GetClientSize().Height - result.Bounds.Bottom;
我們已經為該示例創建了示例,可以從以下鏈接下載該示例,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.