如何将PDF中的图章注释(手写签名图片)嵌入到PDF正文中?

  1. 通过getCurrentPDFDoc接口获取当前文档对象:
//如果是使用PDFViewer类做的实例化操作,直接调用getCurrentPDFDoc接口即可
var pdfDoc = pdfviewer.getCurrentPDFDoc(); // returns PDFDoc
//如果是使用PDFUI类做的实例化操作,可在getCurrentPDFDoc接口的回调中获取文档对象
var pdfDoc = await pdfui.getCurrentPDFDoc(); // returns Promise<PDFDoc>;

2. 通过flatten接口对注释对象进行扁平化操作,将注释对象的手写签名图片变更为图像对象:

pdfDoc.flatten(PDFViewCtrl.PDF.constant.Flatten_Option.annot);