【发布时间】:2021-02-19 17:09:13
【问题描述】:
我正在使用 Telerik RadPdfProcessing for Xamarin 在移动应用程序中自定义 PDF 文档。 代码必须在文档中搜索“#placeholder#”,并将其替换为用户输入的手写签名。
可以使用以下代码在给定位置插入签名图像:
RadFixedPage last = document.Pages.Last();
FixedContentEditor editor = new FixedContentEditor(last);
editor.Position.Translate(400, 900);
editor.DrawImage(imageSource);
我发现一个forum 说库基本上不支持在页面中查找,因为它一次只允许搜索一个字符:
foreach (var contentElement in last.Content) {
if (contentElement is TextFragment) {
TextFragment fragment = (TextFragment) contentElement;
string text = fragment.Text;
//** THIS DOESN'T WORK! **
//if ("#placeholder#" == text) {
// fragment.Text = "";
// editor.Position = fragment.Position;
// editor.DrawImage(imageSource);
//}
}
}
有人有关于这个主题的最新消息吗?
【问题讨论】:
标签: pdf xamarin.forms telerik telerik-pdfprocessing