Syncfusion Xamarin.Forms生成的PDF格式的文本

问题描述 投票:0回答:1

我想问你是否可以创建格式化文本

这个文字是正常的,这个是粗体。我们也有一个斜体字体斜率。

通过这种方式:

graphics.DrawString("This text is normal and this one is bold. We also have an italic font slope.", font, PdfBrushes.Black, new PointF(0, 0));

我试图使用HTML样式文本(https://help.syncfusion.com/file-formats/pdf/working-with-text#adding-a-html-styled-text)来编写文档,但Xamarin不支持PdfHTMLTextElement类。下一个选择是插入RTF文本(https://help.syncfusion.com/file-formats/pdf/working-with-text#inserting-rich-text-format-contents),也不可能在Xamarin中使用它。

我还要在PdfLightTable的单元格中有一个格式化的字符串。你有任何提示如何实现这一目标吗?

我非常感谢你的帮助。

android pdf xamarin.forms pdf-generation syncfusion
1个回答
0
投票

目前,Xamarin平台不支持PdfHTMLTextElement。为了满足您的要求,我们创建了基于HTML标记将样式应用于文本的变通方法示例。

请找到Sample

谢谢。

© www.soinside.com 2019 - 2024. All rights reserved.