CoreControls 未在 PDFTron 中定义错误
CoreControls is not defined error in PDFTron
我不断收到此错误
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 行出现错误。请帮我解决这个问题。提前致谢。
import DocumnetViewer = CoreControls.DocumentViewer;
它不是有效的导入语法。你从哪里得到这个代码?这是一个如何将 pdftron 添加到 angular https://www.pdftron.com/documentation/web/get-started/angular/exist-project/
的示例
我不断收到此错误
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 行出现错误。请帮我解决这个问题。提前致谢。
import DocumnetViewer = CoreControls.DocumentViewer;
它不是有效的导入语法。你从哪里得到这个代码?这是一个如何将 pdftron 添加到 angular https://www.pdftron.com/documentation/web/get-started/angular/exist-project/
的示例