CN115576900A - File viewing method and device, electronic equipment and storage medium - Google Patents

File viewing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115576900A
CN115576900A CN202211241852.0A CN202211241852A CN115576900A CN 115576900 A CN115576900 A CN 115576900A CN 202211241852 A CN202211241852 A CN 202211241852A CN 115576900 A CN115576900 A CN 115576900A
Authority
CN
China
Prior art keywords
file
pdf
user
viewing
pdf file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211241852.0A
Other languages
Chinese (zh)
Inventor
张萌娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211241852.0A priority Critical patent/CN115576900A/en
Publication of CN115576900A publication Critical patent/CN115576900A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation

Abstract

The application relates to the technical field of data processing, in particular to a file viewing method, a file viewing device, electronic equipment and a storage medium, which are applied to a front end of a financial service system, wherein the front end is created based on a VUE (user data Environment) library framework, is inserted into a PDF file online viewing component, is based on a user file query request, and acquires a corresponding PDF file from a back-end data platform of the financial service system according to at least one file unique identifier carried by the user file query request; the online PDF file viewing component is used for rendering the PDF file and performing electronic signature in the corresponding signature area to obtain a PDF preview file.

Description

File viewing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a file viewing method and apparatus, an electronic device, and a storage medium.
Background
With the development of the financial industry, more and more users develop business and trade on computer platforms, wherein various agreements and contracts are necessarily involved. For example, the behavior of viewing agreements and previewing contracts and equivalent reading files can be generated when a lender operates on a financial network platform, and a third party supplier accessing the lending platform needs to be in contact with a large number of credit awards, credit agreements and contracts, so that the agreement number is large, the volume is large, the loading is difficult, the display time is long, and the poor user experience is a difficult part for displaying network files.
At present, a front-end technology realizes document display in various ways, such as html, pictures, pdf, and the like, but based on external resource security audit consideration, html text is not considered, the current contract display mode is to upload a data platform UDMP in a way of acquiring a resource file from a rear end and converting the resource file into a jpg picture, and the front end downloads the resource file from the data platform UDMP to the front end for display according to a specific id, but the picture resource volume is increased, the rendering time is long, and the white screen rate is high.
Disclosure of Invention
In order to overcome the defects in the prior art, the application provides a file viewing method, a file viewing device, electronic equipment and a storage medium, and the smooth preview of a file with a large volume at the front end is realized through a PDF file online viewing component.
In a first aspect, the present application provides a file viewing method, which is applied to a front end of a financial service system, where the front end is created based on a VUE framework, and a PDF file online viewing component is inserted; the method comprises the following steps:
based on a user file query request, acquiring a corresponding PDF file from a back-end data platform of the financial service system according to at least one file unique identifier carried by the user file query request; wherein the PDF file is a contract or an agreement without signature;
and rendering the PDF file by using the online viewing component of the PDF file and electronically signing in a corresponding signature area to obtain a PDF preview file and displaying the PDF preview file to a user.
In a possible implementation manner, the PDF file is uploaded to a back-end data platform of the financial service system for unified storage after responding to a file uploading request and adding a file unique identifier to the PDF file.
In one possible implementation, the rendering the PDF file by using the PDF file online viewing component includes the following steps:
converting the acquired PDF file into a binary file stream;
downloading the binary file stream, and drawing the downloaded binary file stream into a text layer; before downloading the binary file stream, judging whether the size of the binary file stream exceeds a set threshold value, and if the size of the binary file stream exceeds the set threshold value, performing fragment downloading on the binary file stream according to a preset size;
and converting the drawn text layer into a coded picture for rendering.
In a possible implementation manner, a single protocol component and a multi-protocol component are further inserted into the front end, and the obtained PDF preview file is displayed to the user in the following manner:
reading the number of the PDF files; the number of the unique file identifiers carried by the user file query request is consistent with the number of the DF files;
calling a single protocol component or a multi-protocol component to display the PDF file according to the number of the PDF file; if the user file query request carries a file unique identifier, calling a single-protocol component to display the corresponding PDF file, and if the number of the file unique identifiers carried by the user file query request is more than one, calling a multi-protocol component to display the corresponding PDF file.
In a possible implementation manner, the invoking a single-protocol component or a multi-protocol component to display the PDF file according to the number of copies of the PDF file includes the following steps:
importing a set API document into the single protocol component and the multi-protocol component;
calling a single protocol component or a multi-protocol component according to the number of the PDF files, and displaying the PDF files according to set parameters in the API document; and different parameters set in the API document correspond to different PDF file display scenes.
In a possible implementation manner, the PDF file displaying scene at least includes adding an electronic signature to a set area of the PDF file.
In a possible implementation manner, after the obtained PDF preview file is displayed to the user, the method further includes the following steps:
transferring the PDF preview file to a cache for storage;
and responding to the same file query request of the user within a set time period, and directly calling the PDF file from the cache to perform secondary display on the user.
In a second aspect, the present application provides a file viewing apparatus, which is applied to a front end of a financial service system, where the front end is created based on a VUE framework and is inserted into a PDF file online viewing component, and the apparatus includes:
the acquisition module is used for acquiring a corresponding PDF file from a back-end data platform of the financial service system based on a user file query request and according to at least one file unique identifier carried by the user file query request; wherein the PDF file is a contract or an agreement without signature;
and the display module is used for rendering the PDF file by using the online PDF file viewing assembly and performing electronic signature on the corresponding signature area to obtain a PDF preview file to display to a user.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the file viewing method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the file viewing method according to any one of the first aspect.
The file viewing method, the file viewing device, the electronic device and the storage medium provided by the embodiment are applied to a front end of a financial service system, the front end is created based on a VUE library framework, a PDF file online viewing component is inserted, and a corresponding PDF file is acquired from a back end data platform of the financial service system based on a user file query request according to at least one file unique identifier carried by the user file query request; the online PDF file viewing component is used for rendering the PDF file and performing electronic signature in the corresponding signature area to obtain a PDF preview file.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart illustrating a file viewing method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a process of rendering a PDF file by using a PDF file online viewing component according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating the displaying of a PDF file according to the number of copies of the PDF file by calling a single-protocol component or a multi-protocol component according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a PDF file display scenario according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a PDF preview file obtained according to an embodiment of the present application after the PDF preview file is displayed to a user;
FIG. 6 is a block diagram illustrating a structure of a document viewing apparatus according to an embodiment of the present application;
fig. 7 shows a block diagram illustrating a structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
The types of financial products and non-financial products of commercial banks are increasing at present, and with the development of internet technology, users basically complete financial product transactions through online clients, the number of related agreements and contracts is increasing, and the agreements or contracts are read by the users before or after signing.
Currently, online previewing of agreements or contracts for transactions is mostly accomplished with the aid of browsers. Generally, a resource file is obtained from a rear end and then converted into a conventional JPG format picture, and then the JPG format picture is downloaded and rendered for display to a user, but the JPG format picture has a large resource volume, and particularly, for more pages of a protocol or a contract used for transaction, the number of JPG format pictures to be converted and downloaded is large, and the occupied resource volume is larger, so that the system pressure is increased, white screen and even system crash are easily caused, the user experience is poor, and even customer complaints are caused. Based on the above, the application provides a file viewing method, a file viewing device, an electronic device and a storage medium, and a PDF preview file is generated, so that a contract or an agreement to be reviewed can be more smoothly displayed to a user.
Referring to the accompanying drawing 1, in an embodiment, the present application provides a file viewing method applied to a front end of a financial service system, where the front end is created based on a VUE library framework, and the method includes the following steps:
s1, acquiring a corresponding PDF file from a back-end data platform of the financial service system based on a user file query request and according to at least one file unique identifier carried by the user file query request; wherein the PDF file is an unsigned protocol;
and S2, rendering the PDF file by using the online viewing component of the PDF file and performing electronic signature in a corresponding signature area to obtain a PDF preview file and displaying the PDF preview file to a user.
In order to clearly understand the technical solution of the embodiment of the present invention, an application scenario may be first exemplarily described. In the present Application, the financial service system may be a system used by an individual, a business or a government for performing financial decision making or financial data analysis, such as a payment-type App (Application), a bank-type App, a stock-type App, etc. The financial service system comprises a front end and a back end, wherein the front end refers to a foreground part of a website, namely, a webpage which is run on browsers such as a PC end, a mobile end and the like and browsed by a user, various webpage designs are realized by using front end technologies such as HTML, CSS, javaScript and the like, and the aim of the system is to bring extremely high user experience to the user; the back end refers to things which can not be seen by a user, generally, data interaction and website data storage and reading are carried out with the front end, and more back end development refers to interaction with a database and related business logic processing.
In the application, the front end of the financial service system is created based on a VUE framework, the VUE is an open source JavaScript framework for creating a user interface and is also a Web application framework for creating a single page application, which aims to better organize and simplify Web development, and a lighter VUE2.X is preferably used. In addition, in the application, the financial service system is configured to, after receiving an operation instruction of a user preview transaction agreement or a contract, invoke a relevant resource file in a back-end database through a front end, and convert the resource file into a file in a PDF format to display the user.
Specifically, in step S1, the file query request may be generated after the user operates the front-end interface, for example, by clicking a "file query" button, so as to preview the corresponding transaction agreement or contract; and after receiving the file query request of the user, the front end acquires a corresponding resource file from the data platform of the back end through a corresponding interface. In the application, the resource file is a file in a PDF format, and is a pre-stored agreement or contract in an earlier stage.
In an embodiment, the PDF files related to the transaction agreement or the contract may be uploaded to a back-end data platform of the financial service system for unified storage after the front-end responds to the file uploading request and adds a file unique identifier to the PDF files of the transaction agreement or the contract. The file uploading request may be generated after the employee operates the interface at the front end, for example, by clicking a "file uploading" button. The agreement or contract pre-storage is not limited to a data platform, and may be in other storage forms such as a database, and the application is limited and fixed to the above. In addition, in a file uploading request, a plurality of PDF files related to the transaction agreement or contract may be included, and in the process of uploading the plurality of PDF files related to the transaction agreement or contract to a back-end data platform of the financial service system, a file unique identifier is added to each PDF file of the agreement or contract, so as to sequentially and regularly download the corresponding PDF files.
In step S2, referring to fig. 2 of the specification, rendering the PDF file by using the PDF file online viewing component includes the following steps:
s201, converting the acquired PDF file into a binary file stream;
s202, downloading the binary file stream, and drawing the downloaded binary file stream into a text layer; before downloading the binary file stream, judging whether the size of the binary file stream exceeds a set threshold value, and if the size of the binary file stream exceeds the set threshold value, performing fragment downloading on the binary file stream according to a preset size;
s203, converting the drawn text layer into a coded picture for rendering.
Specifically, when the front end obtains a corresponding PDF file from the back end according to the unique file identifier, the PDF file is converted into a binary file stream, such as a blob file stream, and then whether the resource size of the blob file stream exceeds a threshold value is judged, and if the resource size of the converted blob file stream is smaller than 5M, the blob file stream is directly downloaded; if the resource size of the converted blob file stream exceeds 5M, slicing the blob file stream, ensuring that the resource size of each file stream fragment is within 5M, and performing fragmentation downloading; and then drawing the downloaded blob file stream into a canvas text layer, and finally converting the drawn canvas text layer into a base64 coding picture for rendering to generate a previewed PDF file. According to the file viewing method, the PDF preview file is generated, so that the contract or the agreement to be reviewed can be more smoothly displayed to the user, and the situations of page blocking and white screen caused by loading of pictures in the prior art are avoided.
Further, in order to display the PDF preview file more abundantly, that is, the UI interaction diagrams of different scenes, for example, for a file query request containing multiple transaction agreements or contracts and for a file query request containing only one transaction agreement or contract, the display modes of the PDF preview file to be generated are different. For example, when the front end responds to a document query request containing multiple transaction agreements or contracts, the front end can only download one picture, which not only results in slow loading, but also cannot classify each transaction agreement or contract in parallel, so that only after one transaction agreement or contract is read, another transaction agreement or contract can be read, and user experience is affected. Based on this, the application also inserts a single protocol component and a multi-protocol component at the front end of the financial service system, and displays the obtained PDF preview file to the user by the following method:
reading the number of the PDF files acquired from the back end; the number of the unique file identifiers carried by the user file query request is consistent with the number of the DF files;
calling a single protocol component or a multi-protocol component to display the PDF file according to the number of the PDF file; if the user file query request carries a file unique identifier, calling a single-protocol component to display the corresponding PDF file, and if the number of the file unique identifiers carried by the user file query request is more than one, calling a multi-protocol component to display the corresponding PDF file.
Wherein the demo inserted into a single protocol component is as follows:
loading the component;
<template>
<singleAgreement
ref="singleAgreement"
:immediate="false"
:visible="isAgreementActionSheetShow"
title = "personal credit agreement
></singleAgreement></template>
<script>
if(window['LoanlntelligentWidgets']){
Vue.use(window['LoanlntelligentWidgets'])
}
</script>
Calling a method;
is. Isagrementactionsheetshow = true// display protocol float;
(this.$refs.singleAgreement as any).load({type:data.type})
// load single protocol.
Demo inserted into the multiprotocol component is as follows:
loading the component;
<multiAgreement
ref="multiAgreement"
:immediate="false"
:readonly="false"
:Visible="isAgreementShow"
:count-down-num="5"
@agreeree="agregreementBtnHandle"
></multiAgreement>
<script>
if(window['LoanIntelligentWidgets']){
Vue.use(window['LoanlntelligentWidgets'])
}
</script>
calling a method;
is. isigreementactionsheetshow = true// show the float;
(this. # refs. MultiAgement as any.) load ([ { type: ", name:" }, (type: ", name:" } ])// load multiprotocol.
Specifically, referring to fig. 3 in the specification, the calling a single protocol component or a multi-protocol component to display the PDF file according to the number of copies of the PDF file includes the following steps:
s204, importing the set API document into the single protocol assembly and the multi-protocol assembly;
s205, calling a single protocol component or a multi-protocol component according to the number of the PDF files, and displaying the PDF files according to the set parameters in the API document; and different parameters set in the API document correspond to different PDF file display scenes.
Among them, API (Application Programming Interface) is some predefined functions, which aims to provide the ability of Application and developer to access a set of routines based on some software or hardware; an API document is a technical content delivery file that contains a description of how to efficiently use and integrate an API. It is a concise reference manual that contains all the information needed to use an API, detailing functions, classes, return types, parameters, etc.
In the present application, the settings of the API documents are shown in Table one.
Figure BDA0003885087050000101
Figure BDA0003885087050000111
Figure BDA0003885087050000121
Figure BDA0003885087050000131
Watch 1
Different PDF file display scenes are designed according to different parameters set in an API document, referring to an attached figure 4 in the specification, and different display scenes of the PDF file are shown, such as display scenes of protocol loading, protocol reloading, single-protocol button-free, multi-protocol button-free, electronic signature protocol and amplification protocol. Wherein the button may be other forms of buttons besides representing "i have browsed and agreed to". The electronic signature is attached to the electronic document and is logically associated with the electronic document, and can be used for identifying the identity of a signer of the electronic document, ensuring the integrity of the document and representing the content of the fact stated by the signer agreeing to the electronic document. The electronic signature is an expression form of the electronic signature, the electronic signature operation is converted into a visual effect which is the same as the paper document stamping operation by using an image processing technology, and meanwhile, the authenticity and the integrity of electronic information and the non-repudiation of a signer are guaranteed by using the electronic signature technology.
Further, referring to fig. 5 in the specification, after the PDF preview file is obtained and displayed to the user, the method further includes the following steps:
p1, transferring the acquired PDF preview file to a cache for storage;
and P2, responding to the same file query request of the user within a set time period, and directly calling the PDF file from the cache to perform secondary display on the user.
Namely, the loaded agreement or contract is cached, so that the user can read and display for the second time.
The file viewing method is applied to a front end which is created based on a VUE library framework and is inserted with a PDF file online viewing component, can generate a corresponding PDF preview file for transactions or contracts with large volume and slow loading of displayed files, and smoothly displays the PDF preview file to a user.
Based on the same inventive concept, the embodiment of the present application further provides a file viewing apparatus, and since the principle of the apparatus in the embodiment of the present application for solving the problem is similar to that of the above file viewing method in the embodiment of the present application, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 6 in the specification, the present application further provides a file viewing apparatus, which is applied to a front end of a financial service system, where the front end is created based on a VUE framework, and inserts a PDF file online viewing component; the device comprises:
an obtaining module 601, configured to obtain, based on a user file query request, a corresponding PDF file from a back-end data platform of the financial service system according to at least one file unique identifier carried in the user file query request; wherein the PDF file is a contract or an agreement without signature;
a display module 602, configured to render the PDF file by using the online PDF file viewing component and perform electronic signature in a corresponding signature area to obtain a PDF preview file for display to a user.
In some embodiments, the PDF file is uploaded to a back-end data platform of the financial service system for unified storage after responding to a file upload request and adding a file unique identifier to the PDF file.
In some embodiments, the presentation module 602 renders the PDF file using the PDF file online viewing component, including:
converting the acquired PDF file into a binary file stream;
downloading the binary file stream, and drawing the downloaded binary file stream into a text layer; before downloading the binary file stream, judging whether the size of the binary file stream exceeds a set threshold value, and if the size of the binary file stream exceeds the set threshold value, performing fragment downloading on the binary file stream according to a preset size;
and converting the drawn text layer into a coded picture for rendering.
In some embodiments, a single protocol component and a multi-protocol component are further inserted into the front end, and the presenting module 602 presents the obtained PDF preview file to the user, including:
reading the number of the PDF files; the number of the unique file identifiers carried by the user file query request is consistent with the number of the DF files;
calling a single protocol component or a multi-protocol component to display the PDF file according to the number of the PDF files; if the user file query request carries a file unique identifier, calling a single-protocol component to display the corresponding PDF file, and if the number of the file unique identifiers carried by the user file query request is more than one, calling a multi-protocol component to display the corresponding PDF file.
Importing a set API document into the single protocol component and the multi-protocol component; calling a single protocol component or a multi-protocol component according to the number of the PDF files, and displaying the PDF files according to set parameters in the API document; and different parameters set in the API document correspond to different PDF file display scenes.
In some embodiments, the apparatus further comprises:
the cache module is used for transferring the acquired PDF preview file to a cache for storage; and responding to the same file query request of the user within a set time period, and directly calling the PDF file from the cache to perform secondary display on the user.
According to the file viewing device provided by the application, a corresponding PDF file is acquired from a back-end data platform of a financial service system through an acquisition module based on a user file query request and according to at least one file unique identifier carried by the user file query request; the PDF file online viewing component is used for rendering the PDF file through the display module and performing electronic signature in the corresponding signature area to obtain a PDF preview file to be displayed to a user, so that a contract or a protocol to be reviewed can be displayed to the user more smoothly by a mode of generating the PDF preview file, and the situations of page blockage and white screen caused by loading pictures in the prior art are avoided.
Based on the same concept of the present invention, as shown in fig. 7 in the specification, an embodiment of the present application provides a structure of an electronic device 700, where the electronic device 700 includes: at least one processor 701, at least one network interface 704 or other user interface 703, memory 705, and at least one communication bus 702. A communication bus 702 is used to enable connective communication between these components. The electronic device 700 optionally contains a user interface 703 including a display (e.g., touchscreen, LCD, CRT, holographic (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (e.g., mouse, trackball (trackball), touch pad or touchscreen, etc.).
Memory 705 may include both read-only memory and random access memory and provide instructions and data to processor 701. A portion of the memory 705 may also include non-volatile random access memory (NVRAM).
In some embodiments, memory 705 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
an operating system 7051, which contains various system programs for implementing various basic services and for processing hardware-based tasks;
the application module 7052 contains various applications, such as a desktop (launcher), a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services.
In the embodiment of the present application, the processor 701 is configured to perform the steps of a document viewing method by calling the program or instructions stored in the memory 705, so as to efficiently and professionally analyze the transaction of the financial product of the user and guide the user to complete a new transaction.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps as in the file viewing method.
In particular, the storage medium can be a general-purpose storage medium, such as a removable disk, a hard disk, or the like, and when the computer program on the storage medium is executed, the file viewing method can be executed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the technical solutions of the present application, and the scope of the present application is not limited thereto, although the present application is described in detail with reference to the foregoing examples, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The file viewing method is characterized by being applied to a front end of a financial service system, wherein the front end is created based on a VUE framework, and a PDF file online viewing component is inserted; the method comprises the following steps:
acquiring a corresponding PDF file from a back-end data platform of the financial service system based on a user file query request and according to at least one file unique identifier carried by the user file query request; wherein, the PDF file is a contract or an agreement which is not signed;
and rendering the PDF file by using the online viewing component of the PDF file and electronically signing in a corresponding signature area to obtain a PDF preview file and displaying the PDF preview file to a user.
2. The method as claimed in claim 1, wherein the PDF file is uploaded to a back-end data platform of the financial services system for unified storage after responding to a file upload request and adding a file unique identifier to the PDF file.
3. A method as claimed in claim 2, wherein said step of rendering said PDF file by using said PDF file online viewing component comprises the following steps:
converting the acquired PDF file into a binary file stream;
downloading the binary file stream, and drawing the downloaded binary file stream into a text layer; before downloading the binary file stream, judging whether the size of the binary file stream exceeds a set threshold value, and if the size of the binary file stream exceeds the set threshold value, performing fragment downloading on the binary file stream according to a preset size;
and converting the drawn text layer into a coded picture for rendering.
4. A method as claimed in claim 3, wherein a single protocol component and a multi-protocol component are further inserted into the front end, and the obtained PDF preview file is displayed to the user as follows:
reading the number of the PDF files; the number of the unique file identifiers carried by the user file query request is consistent with the number of the DF files;
calling a single protocol component or a multi-protocol component to display the PDF file according to the number of the PDF files; if the user file query request carries a file unique identifier, calling a single-protocol component to display the corresponding PDF file, and if the number of the file unique identifiers carried by the user file query request is more than one, calling a multi-protocol component to display the corresponding PDF file.
5. A method as claimed in claim 4, wherein said step of invoking a single protocol component or a multi-protocol component to display the PDF file according to the number of copies of the PDF file comprises the steps of:
importing a set API document into the single protocol component and the multi-protocol component;
calling a single protocol component or a multi-protocol component according to the number of the PDF files, and displaying the PDF files according to set parameters in the API document; and different parameters set in the API document correspond to different PDF file display scenes.
6. A file viewing method as claimed in claim 5, wherein the displaying of the PDF file at least includes adding an electronic signature to a set area of the PDF file.
7. A method for viewing a file as claimed in claim 6, wherein after said obtaining the PDF preview file and displaying it to the user, the method further comprises the following steps:
transferring the obtained PDF preview file to a cache for storage;
and responding to the same file query request of the user within a set time period, and directly calling the PDF file from the cache to perform secondary display on the user.
8. The file viewing device is applied to a front end of a financial service system, the front end is created based on a VUE framework, and a PDF file online viewing component is inserted; the device comprises:
the acquisition module is used for acquiring a corresponding PDF file from a back-end data platform of the financial service system based on a user file query request and according to at least one file unique identifier carried by the user file query request; wherein the PDF file is a contract or an agreement without signature;
and the display module is used for rendering the PDF file by using the online viewing component of the PDF file and carrying out electronic signature in a corresponding signature area to obtain a PDF preview file to display to a user.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions being executable by the processor to perform the steps of the file viewing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program for performing, when executed by a processor, the steps of the file viewing method according to any one of claims 1 to 7.
CN202211241852.0A 2022-10-11 2022-10-11 File viewing method and device, electronic equipment and storage medium Pending CN115576900A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211241852.0A CN115576900A (en) 2022-10-11 2022-10-11 File viewing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211241852.0A CN115576900A (en) 2022-10-11 2022-10-11 File viewing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115576900A true CN115576900A (en) 2023-01-06

Family

ID=84584672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211241852.0A Pending CN115576900A (en) 2022-10-11 2022-10-11 File viewing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115576900A (en)

Similar Documents

Publication Publication Date Title
US10769350B2 (en) Document link previewing and permissioning while composing an email
US9276758B2 (en) Analyzing and repairing documents
US10223698B2 (en) Integrating a web-based CRM system with a PIM client application
CA2841815A1 (en) Method for associating third party content with online document signing
CN110020329B (en) Method, device and system for generating webpage
US20120233532A1 (en) Apparatus, system and method for a vector-based form field document
US11356496B2 (en) Systems and methods of publishing a design
WO2022048141A1 (en) Image processing method and apparatus, and computer readable storage medium
CN113382083B (en) Webpage screenshot method and device
CA2853386C (en) Mobile solution for importing and signing third-party electronic signature documents
CN117093386B (en) Page screenshot method, device, computer equipment and storage medium
US20150100868A1 (en) System and method for simulating dynamic content by automatically updating a static image with applicability to a virtual business card
CN115576900A (en) File viewing method and device, electronic equipment and storage medium
CN110647327A (en) Method and device for dynamic control of user interface based on card
AU2018211353A1 (en) Virtual shop for electronic greeting cards
TWI742429B (en) System for displaying signature message of portable document format file in web page and method thereof
CN113342450A (en) Page processing method and device, electronic equipment and computer readable medium
KR102404194B1 (en) System for managing webpage
CN111258465B (en) Method and equipment for displaying and viewing information
CN117034363A (en) Electronic signature method, electronic signature device, electronic equipment and storage medium
CN116934411A (en) Transaction order creation method, device, electronic equipment and readable storage medium
CN117112812A (en) PPT file generation method and device, computer equipment and medium
CN114143305A (en) Information display method, device and equipment
CN117274429A (en) Poster picture generation method and device, electronic equipment and storage medium
CN116468008A (en) Information insertion method, apparatus, device, medium and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination