WebViewer Version: 11.9.0
Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No
Please give a brief summary of your issue:
I want to enable OCR module in webviewer.
Please describe your issue and provide steps to reproduce it:
I want to enable OCR module in webviewer. I’ve install the data-extraction. when I try to access the OCR module in webviewer getting “Undefined”.
I have add code for your reference:
initilize: function () {
$('.common-loading-spinner-text').text('Please do not close your browser or press the back button until the document has fully loaded.');
$('.common-loading').show();
WebViewer.Iframe({
path: '/GovBuilt.PlanReview/webviewer',
licenseKey: Apryse.licenseKey,
initialDoc: !Apryse.isForntEndDoc ? Apryse.pdffilepath : null,
loadSpinner: false,
annotationUser: this.userId,
compareDefaultLayout: Apryse.compareDefaultLayout,
permissions: Apryse.permissions,
fullAPI: true,
UI: 'Modular',
enableDataExtraction: true,
css: '/GovBuilt.PlanReview/css/viewer.min.css',
}, document.getElementById(Apryse.viewerId))
.then((instance) => {
window.webViewerInstance = instance;
core = instance.Core;
const { documentViewer, annotationManager, Annotations } = instance.Core;
const { Feature } = instance.UI;
const { Color } = Annotations;
const { PDFNet, Tools, OCRModule } = instance.Core;
console.log(PDFNet.OCRModule);
console.log(OCRModule);
const UIEvents = instance.UI.Events;
I have use npm to download:
{
"sources": [
"node_modules/@pdftron/webviewer/public"
],
"target": "wwwroot/webviewer/"
},
{
"sources": [
"node_modules/@pdftron/data-extraction/lib"
],
"target": "wwwroot/webviewer/core/extraction/"
},
My folder structure look like:
GovBuilt.Products\GovBuilt.PdfReview\wwwroot\webviewer\core\extraction
let me the way to access the ocr Module for the webviewer. I tried the document but there I got confused.