ocr识别-校核onlyoffice版

This commit is contained in:
liyawei
2022-04-12 19:05:31 +08:00
parent 63bc1c6f22
commit 02c44ea7ff
19 changed files with 2364 additions and 4 deletions
@@ -0,0 +1,44 @@
/**
*
* (c) Copyright Ascensio System SIA 2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
html {
height: 100%;
width: 100%;
}
body {
background: #fff;
color: #333;
font-family: Arial, Tahoma,sans-serif;
font-size: 12px;
font-weight: normal;
height: 100%;
margin: 0;
overflow-y: hidden;
padding: 0;
text-decoration: none;
}
.form {
height: 100%;
}
div {
margin: 0;
padding: 0;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

@@ -0,0 +1,24 @@
version=1.1.0
filesize-max=5242880
storage-folder=D:\\OOFILES
files.docservice.fill-docs=.oform|.docx
files.docservice.viewed-docs=.pdf|.djvu|.xps|.oxps
files.docservice.edited-docs=.docx|.xlsx|.csv|.pptx|.txt|.docxf
files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2
files.docservice.timeout=120000
files.docservice.url.site=http://172.29.96.1:9000/
files.docservice.url.command=http://172.29.96.1:9000/coauthoring/CommandService.ashx
files.docservice.url.converter= http://172.29.96.1:9000/ConvertService.ashx
files.docservice.url.tempstorage= http://172.29.96.1:9000/ResourceService.ashx
files.docservice.url.api= http://172.29.96.1:9000/web-apps/apps/api/documents/api.js
files.docservice.url.preloader= http://172.29.96.1:9000/web-apps/apps/api/documents/cache-scripts.html
files.docservice.url.example= http://172.29.96.1:9000
files.docservice.secret=
files.docservice.header=Authorization
@@ -0,0 +1,127 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ONLYOFFICE</title>
<link rel="icon" href="../asstes/favicon.ico" type="image/x-icon" />
<body>
<script type="text/javascript" th:src="${docserviceApiUrl}"></script>
<script type="text/javascript" language="javascript">
var docEditor;
var fileName = "[[${fileName}]]";
var fileType = "[[${fileType}]]";
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("action=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
var сonnectEditor = function () {
docEditor = new DocsAPI.DocEditor("iframeEditor",
{
type: "[[${type}]]",
documentType: "[[${documentType}]]",
document: {
title:"[[${fileName}]]",
url: "[[${fileUri}]]",
fileType: "[[${fileType}]]",
key: "[[${fileKey}]]",
info: {
author: "Me",
created: "[[${documentCreated}]]",
},
permissions: {
edit: "[[${permissionsEdit}]]",
download: true,
}
},
editorConfig: {
mode: "[[${editorMode}]]",
lang: "cn",
callbackUrl: "[[${callbackUrl}]]",
user: {
id: "[[${editorUserId}]]",
name: "[[${editorUserName}]]",
},
embedded: {
saveUrl: "[[${fileUri}]]",
embedUrl: "[[${fileUri}]]",
shareUrl: "[[${fileUri}]]",
toolbarDocked: "top",
},
customization: {
about: true,
feedback: true,
goback: {
url: "[[${serverUrl}]]",
},
},
},
events: {
"onReady": onReady,
"onDocumentStateChange": onDocumentStateChange,
'onRequestEditRights': onRequestEditRights,
"onError": onError,
"onOutdatedVersion": onOutdatedVersion,
}
});
};
if (window.addEventListener) {
window.addEventListener("load", сonnectEditor);
} else if (window.attachEvent) {
window.attachEvent("load", сonnectEditor);
}
function getXmlHttp() {
var xmlhttp;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (ex) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest !== "undefined") {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
</script>
</head>
<div class="form" style="height: 900px;">
<div id="iframeEditor" ></div>
</div>
</body>
</html>