-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling the textLayer in PDFjs #85
Comments
Just figured it out, For people needing this,
|
Hello, For me that provoque error in console : PDFViewerApplicationOptions is not defined... thanks |
@Paul75 Load complete function should be called after document is loaded.
|
This is not working for me... It did not change anything. my html: <ng2-pdfjs-viewer #pdfViewer [pdfSrc]="data.pdfSrc" viewerId="anyId" (onDocumentLoad)="loadComplete()"></ng2-pdfjs-viewer> my component: @ViewChild('pdfViewer', { static: false }) pdfViewer: PdfJsViewerComponent;
loadComplete() {
console.log('loadComplete');
this.pdfViewer.PDFViewerApplicationOptions.textLayer = false;
this.cdr.markForCheck();
} As you can see I am even trying to call "markForCheck()" to hopefully fire any change but nothing changes... The console.log gets logged to the console, but the textLayer is still rendered above the canvas. |
@Avejack Same here... Did you find a solution? |
@tigrenok00 For my use case - yes. But not for this problem - sorry. |
I need to disable the
textLayer
that is rendered above the canvas to reduce memory.In PDFjs it is done with the code below,
PDFJS.disableTextLayer = false
How to do it using
ng2-pdfjs-viewer
?The text was updated successfully, but these errors were encountered: