gpt4 book ai didi

javascript - PDFTron 中的自由文本工具 focusout()

转载 作者:行者123 更新时间:2023-11-30 19:00:57 24 4
gpt4 key购买 nike

我将 PDFTron 用于内部网站。当我单击 PDFTron 中的自由文本工具时,它工作正常。我需要的是在文本工具的 focusout() 上我需要选择平移工具。

有人可以指导我如何去做吗?

最佳答案

您能否阐明自由文本工具的 focusout 是什么意思?您的意思是在创建 FreeText 注释后它会切换到平移工具吗?

以下是创建自由文本注释后如何切换到它:

const { docViewer } = instance;

const freeTextTool = docViewer.getTool('AnnotationCreateFreeText');

// note that in WebViewer 5.2 you need to add the "e" parameter like:
// (e, annotation) => {
freeTextTool.on('annotationAdded', (annotation) => {
setTimeout(() => {
instance.setToolMode('Pan');
}, 0);
});

关于javascript - PDFTron 中的自由文本工具 focusout(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59519102/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com