A document online preview method and system

Through the online document preview method of working together between the client and the server, the problem of exposure of multiple programs and permissions in document preview is solved, and document preview in multiple devices and environments is realized, and storage space and transmission delays are reduced. , provides a clearer preview effect.

CN113778680BInactive Publication Date: 2024-11-19XIAMEN YUEXUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111060311.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the document preview, the existing technology has problems such as user needs to install a variety of third-party programs, uncontrollable document management permissions, large storage space after file conversion, long transmission delay, fixed resolution, blurred text and blurred printing.

Method used

The document online preview method is adopted for the working collaboratively between the client and the server. The document format is detected by the client. If supported, the preview device will be loaded, otherwise the program will be terminated. The client communicates with the server to request the preview document, and the server searches or converts the document and transmits it. , client rendering and display, supports a variety of devices and environments, and dynamically loads watermarks.

Benefits of technology

No need to install third-party programs, document preview reduces storage space in an autonomous and controllable environment, supports a variety of devices and formats, and PDF files have small capacity, fast transmission, and clear viewing and printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778680B_ABST
    Figure CN113778680B_ABST
Patent Text Reader

Abstract

The invention discloses a document online preview method, which is implemented based on a client and a server, and comprises the following steps: S1, the client receives a document preview instruction from a user; S2, the client determines whether the document is in a supported document format, if supported, the client loads a corresponding preview device, otherwise, the client terminates the program and prompts the user; S3, the client communicates with the server to request preview of the document; S4, the server searches whether there is a preview document in a specified format corresponding to the converted document, if so, it is directly transmitted to the client, otherwise, the server first converts the document into a preview document in the specified format, and then transmits it to the client; S5, the client parses the preview document and renders it for display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and specifically to a document online preview method and system. Background Art

[0002] Due to the development of Internet technology, users hope to be able to easily open and preview documents (including but not limited to Word, spreadsheets, slide files, web page files, TXT text files) on a variety of device terminals. There are two main existing technical implementation methods:

[0003] 1. Call a third-party dedicated program from an existing application to open a document. This method has the following problems:

[0004] (1) Users need to download and install dedicated third-party programs on their devices, which takes time to download and install and also takes up additional storage space on the device;

[0005] (2) After the third-party program opens the document, the document's access permissions are exposed to the third-party program, and the user can save and modify it, making the document management permissions uncontrollable;

[0006] (3) Often a dedicated program can only open one or several documents, so users need to install multiple third-party programs to preview multiple documents;

[0007] (4) When users use document preview on different devices (such as mobile phones and computers) and different operating systems (such as Mac, Windows, Android, and iOS), they need to install different third-party applications according to the client environment, which causes trouble for users.

[0008] 2. Convert the document into a bitmap file and then preview it. This method has the following problems:

[0009] (1) When a document is converted into a bitmap file, the character format is converted into a pixel format, and the storage space occupied is much larger than the original document;

[0010] (2) Since the converted bitmap files are large, the network transmission delay is long, which increases the user's waiting time;

[0011] (3) The resolution of the bitmap file is fixed. If the image is enlarged, the fonts and details will appear blurred.

[0012] (4) The text in the bitmap file cannot be copied;

[0013] (5) The converted bitmap file is blurry when printed. Summary of the invention

[0014] In response to the above problems, the present invention proposes a document online preview method and system.

[0015] To achieve the above object, the present invention adopts the following technical solutions:

[0016] A document online preview method, which is implemented based on a client and a server, includes the following steps:

[0017] S1, the client receives a document preview instruction from a user;

[0018] S2, the client determines whether the document is in a supported document format, if so, the client loads a corresponding preview device, otherwise, the client terminates the program and prompts the user;

[0019] S3, the client communicates with the server to request preview of the document;

[0020] S4, the server searches whether there is a preview document in a specified format corresponding to the converted document. If so, the preview document is directly transmitted to the client. Otherwise, the server first converts the document into a preview document in the specified format and then transmits it to the client.

[0021] S5. The client parses the preview document and renders it for display.

[0022] Preferably, step S2 is specifically as follows: the client reads the format of the document currently required to be previewed through the suffix name of the document, compares it with the list of document support formats stored in the client, and determines whether the document is in a supported document format; if supported, the client loads the corresponding preview device; otherwise, the client terminates the program and prompts the user.

[0023] Preferably, step S3 specifically includes:

[0024] S31, the client operating environment detection instruction detects the operating environment of the current application and calls the document preview device corresponding to the operating environment;

[0025] S32: The document preview device accesses the server through the network communication interface and sends a preview request of the document to the server.

[0026] Preferably, the operating environment includes one of a web browser, a WeChat H5 application environment, and a WeChat applet environment.

[0027] Preferably, step S4 is specifically as follows: the server receives a preview request, searches the memory for a preview document corresponding to the converted document based on the main parameters of the request, and if so, transmits it directly to the client; otherwise, the server calls a document conversion device to first convert the document into a preview document and save it in the memory, and then transmits it to the client.

[0028] Preferably, main parameters of the preview request are the document resource address and the unique identifier of the document.

[0029] Preferably, step S5 is specifically as follows: the client calls the document preview device of the current application environment to render the preview document and display it to the user, and according to the configuration parameters of the client, a semi-transparent text watermark can be dynamically loaded in the preview page, and the content of the watermark is a dynamically set string parameter.

[0030] A document online preview system, comprising a client and a server connected in communication, wherein the client comprises a user interaction interface, a client processor, a document preview device and a client communication interface, and the server comprises a server communication interface, a server processor and a memory;

[0031] The user interaction interface is used to implement user interaction and provide functions of opening and closing windows, operation prompts, and displaying a document content preview interface;

[0032] The client processor is used to respond to user interaction, determine the application environment where the client is located, and control the user interaction interface, document preview device and client communication interface;

[0033] The document preview device can be used to process document preview requests in different application environments;

[0034] The client communication interface is used to send requests to the server and receive data returned by the server;

[0035] The server communication interface is used to receive the access request from the client and return data;

[0036] The server processor is used to process the document preview request of the client, control the logic of document conversion, and control the server communication interface and memory;

[0037] The memory is used to store data, original documents, and preview documents after format conversion.

[0038] After adopting the above technical solution, the present invention has the following advantages compared with the background technology:

[0039] 1. The present invention provides a document online preview method and system. For multiple document formats supported, users no longer need to install third-party dedicated applications, thereby reducing device storage space and operating memory.

[0040] 2. The present invention provides a document online preview method and system. The document online preview runs in an autonomous and controllable environment, which can avoid the exposure of the document reading and writing permissions after the document is opened by a third-party application, and can achieve watermarking and better permission control.

[0041] 3. The present invention provides a document online preview method and system, which supports multiple devices, including mobile phones, tablet computers, and PCs; can run across multiple common application environments, including Android clients, iOS clients, WeChat applets, web browsers, etc.; can support multiple common document formats, making it convenient for users to use.

[0042] 4. The present invention provides a document online preview method and system. The PDF file has a smaller capacity than the converted file formed by the bitmap preview method, a faster transmission speed, and is clearer when viewed and printed. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The figure is a flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0045] It should be noted that in the present invention, the terms "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element of the present invention must have a specific orientation, and therefore cannot be understood as a limitation on the present invention. Example

[0046] Please refer to Figure 1 As shown, the present invention discloses a document online preview method, which is implemented based on a client and a server, and includes the following steps:

[0047] S1. A user opens a link resource of a document through a user interaction interface of a client, and the client receives a preview instruction from the user;

[0048] S2. The client reads the format of the document currently to be previewed through the suffix of the document, compares it with the list of document support formats stored in the client, and determines whether the document is in a supported document format. If supported, the client loads the corresponding preview device; otherwise, the client terminates the program and prompts the user through the user interaction interface;

[0049] When the client starts, it automatically downloads the latest list of supported document formats from the server.

[0050] S3, the client communicates with the server to request a preview document;

[0051] S31, a client operating environment detection instruction, detecting the operating environment of the current application, and calling a document preview device corresponding to the operating environment;

[0052] The operating environment includes a web browser, a WeChat H5 application environment, and a WeChat applet environment.

[0053] S32, the document preview device accesses the server through the network communication interface and sends a document preview request to the server;

[0054] S4. The server receives the preview request and searches the storage device for a PDF document corresponding to the converted document according to the document resource address or the unique identification code. If so, the document is directly transmitted to the client. Otherwise, the server calls the document conversion device to convert the document into a specified PDF document and then transmits it to the client. If the previewed document is in PDF file format, it does not need to be converted again.

[0055] The document conversion device can output a PDF document of a single file or generate a PDF document per page according to configurable conversion parameters.

[0056] The PDF document transmitted from the server to the client through the communication interface can be a whole document, or one PDF document can be sent per page.

[0057] S5. The client calls the document preview device of the current application environment to parse the PDF document, render the PDF document and display it to the user. According to the configuration parameters of the client, a semi-transparent text watermark can be dynamically loaded in the preview page, and the content of the watermark is a string parameter that can be dynamically set.

[0058] A document online preview system comprises a client and a server connected in communication, wherein the client comprises a user interaction interface, a client processor, a document preview device and a client communication interface, and the server comprises a server communication interface, a server processor and a memory;

[0059] User interaction interface, used to implement user interaction, providing functions such as opening and closing windows, operation prompts, and displaying document content preview interface;

[0060] The client processor is used to respond to user interactions, determine the application environment where the client is located, and control the user interaction interface, document preview device and client communication interface;

[0061] A document preview device, which can be used to process document preview requests in different application environments;

[0062] The client communication interface is used to send requests to the server and receive data returned by the server;

[0063] The server communication interface is used to receive access requests from clients and return data;

[0064] The server processor is used to process the document preview request from the client, control the logic of document conversion, and control the server communication interface and storage;

[0065] The memory is used to store data, original documents, and preview documents after format conversion.

[0066] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A document online preview method, which is implemented based on a client and a server. It is characterized in that The following steps are involved: S1, the client receives a document preview instruction from a user; S2, the client determines whether the document is in a supported document format, if so, the client loads a corresponding preview device, otherwise, the client terminates the program and prompts the user; S3, the client communicates with the server to request preview of the document; Step S3 specifically includes: S31, the client operating environment detection instruction detects the operating environment of the current application, the operating environment includes one of a web browser, WeChat H5 application environment and WeChat applet environment, and calls the document preview device corresponding to the operating environment; S32, the document preview device accesses the server through the network communication interface and sends a preview request of the document to the server; S4, the server searches whether there is a preview document in a specified format corresponding to the converted document. If so, the preview document is directly transmitted to the client. Otherwise, the server first converts the document into a preview document in the specified format and then transmits it to the client. Step S4 specifically includes: the server receives the preview request, searches the storage for a preview document corresponding to the converted document according to the main parameters of the request, and if so, directly transmits it to the client; otherwise, the server calls the document conversion device to convert the document into a preview document and saves it in the storage, and then transmits it to the client; S5, the client parses the preview document and renders it for display; Step S5 specifically includes: the client calls the document preview device of the current application environment to render the preview document and display it to the user, and according to the configuration parameters of the client, a semi-transparent text watermark can be dynamically loaded in the preview page, and the content of the watermark is a dynamically settable string parameter; The client reads the format of the document currently required to be previewed through the suffix name of the document, compares it with the list of document support formats stored in the client, and determines whether the document is in a supported document format. If supported, the client loads the corresponding preview device; otherwise, the client terminates the program and prompts the user.

2. A document online preview method as claimed in claim 1, Features: The main parameters of the preview request are the document resource address and the unique identifier of the document.

3. A preview system for a document online preview method as claimed in any one of claims 1 to 2, Features: It includes a client and a server connected in communication, the client includes a user interaction interface, a client processor, a document preview device and a client communication interface, and the server includes a server communication interface, a server processor and a memory; The user interaction interface is used to implement user interaction and provide functions of opening and closing windows, operation prompts, and displaying a document content preview interface; The client processor is used to respond to user interaction, determine the application environment where the client is located, and control the user interaction interface, document preview device and client communication interface; The document preview device can be used to process document preview requests in different application environments; The client communication interface is used to send requests to the server and receive data returned by the server; The server communication interface is used to receive the access request from the client and return data; The server processor is used to process the document preview request of the client, control the logic of document conversion, and control the server communication interface and memory; The memory is used to store data, original documents, and preview documents after format conversion.