【问题标题】:CoreControls is not defined error in PDFTronPDFTron 中的 CoreControls 未定义错误
【发布时间】:2020-01-31 12:49:43
【问题描述】:

我不断收到此错误 Uncaught ReferenceError: CoreControls is not defined

import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import DocumnetViewer = CoreControls.DocumentViewer;
declare const WebViewer: any;

@Component({
     selector: 'app-root',
     templateUrl: './app.component.html',
     styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, AfterViewInit {
@ViewChild('viewer') viewer: ElementRef;
wvInstance: any;

ngAfterViewInit(): void {
      /* some code */
      const documentViewer = new DocumnetViewer();
      documentViewer.displayPageLocation(3, 1, 3, true);
     /* some code */
}
}

在第 2 行出现错误。请帮我解决这个问题。提前致谢。

【问题讨论】:

    标签: typescript pdftron


    【解决方案1】:
    import DocumnetViewer = CoreControls.DocumentViewer;
    

    它,无效的导入语法。你从哪里得到这个代码?这是一个如何将 pdftron 添加到 angular https://www.pdftron.com/documentation/web/get-started/angular/exist-project/

    的示例

    【讨论】:

    猜你喜欢
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    • 2021-05-29
    • 2014-09-26
    • 1970-01-01
    • 2014-02-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多