A document conversion method and device
By displaying thumbnails during the document conversion process and generating new documents according to user selection, and automatically converting them to PDF, the problem of cumbersome operations in the existing technology is solved and the efficiency of document conversion is improved.
Patent Information
- Application Number
- CN202010269667.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-08
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-04-08
AI Technical Summary
In the prior art, when converting documents into PDF, user operations are cumbersome and the efficiency is low.
When the thumbnail of the document to be processed is displayed, the user selection instruction is received, the target thumbnail is determined, and a new document in the same format as the document to be processed is generated based on it, and is automatically converted into a PDF document.
It simplifies user operations, improves the efficiency of document conversion, and reduces the steps of manual extraction and format conversion.
Smart Images

Figure CN112784524B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a document conversion method and device. Background Art
[0002] PDF (Portable Document Format) is an electronic document format. PDF documents are widely used in electronic books, e-mails, network materials, etc. In actual operation, users may need to convert several pages contained in a document in other formats into PDF documents.
[0003] In the prior art, when a user needs to convert several pages contained in a document (which may be referred to as target document pages) into a PDF document, the target document pages can be extracted from the document, and then a new document (which may be referred to as a target document) containing only the target document pages can be obtained. Then, the user can open the target document and manually convert the target document into a PDF document.
[0004] It can be seen that in the above conversion process, the user operation is cumbersome, resulting in low efficiency of document conversion. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide a document conversion method and device, which can improve the efficiency of document conversion. The specific technical solution is as follows:
[0006] In a first aspect, in order to achieve the above-mentioned object, an embodiment of the present invention provides a document conversion method, the method comprising:
[0007] In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page included in the document to be processed are displayed;
[0008] When receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0009] Generate a new document in the same format as the document to be processed as a target document according to the document page corresponding to the target thumbnail;
[0010] Convert the target document into a PDF document.
[0011] Optionally, there are multiple target thumbnails;
[0012] The step of generating a new document having the same format as the document to be processed according to the document page corresponding to the target thumbnail includes:
[0013] receiving a grouping instruction input by the user, wherein the grouping instruction carries a grouping mode identifier, and the grouping mode identifier is used to indicate a mode in which the user groups the target thumbnails;
[0014] Grouping the target thumbnails according to the grouping method indicated by the grouping method identifier;
[0015] For each group of thumbnails after grouping, a document including document pages corresponding to the group of thumbnails is generated.
[0016] Optionally, generating a document including document pages corresponding to each group of thumbnails after grouping includes:
[0017] A document including the document pages corresponding to the group of thumbnails is generated according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
[0018] Optionally, generating a document including document pages corresponding to each group of thumbnails after grouping includes:
[0019] According to the order in which the user selects the group of thumbnails, a document including document pages corresponding to the group of thumbnails is generated.
[0020] Optionally, the method further includes:
[0021] When the conversion instruction is received, the page number of the document page corresponding to the thumbnail in the to-be-processed document is displayed at a preset position in each thumbnail.
[0022] In a second aspect, in order to achieve the above-mentioned object, an embodiment of the present invention provides a document conversion device, the device comprising:
[0023] A first display module is used for displaying thumbnails of each document page included in the document to be processed when receiving a conversion instruction for the document to be processed when displaying the document to be processed;
[0024] A determination module, configured to, when receiving a selection instruction input by a user, determine the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0025] A generating module, used for generating a new document having the same format as the document to be processed according to the document page corresponding to the target thumbnail, as the target document;
[0026] The conversion module is used to convert the target document into a PDF document.
[0027] Optionally, there are multiple target thumbnails;
[0028] The generating module is specifically used to receive the grouping instruction input by the user, wherein the grouping instruction carries a grouping mode identifier, and the grouping mode identifier is used to indicate the mode in which the user groups the target thumbnails;
[0029] grouping the target thumbnails according to the grouping method indicated by the grouping method identifier;
[0030] For each group of thumbnails after grouping, a document including document pages corresponding to the group of thumbnails is generated.
[0031] Optionally, the generating module is specifically configured to generate a document including the document pages corresponding to the group of thumbnails according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
[0032] Optionally, the generating module is specifically configured to generate a document including document pages corresponding to the group of thumbnails according to the order in which the user selects the group of thumbnails.
[0033] Optionally, the device further comprises:
[0034] The second display module is used for displaying the page number of the document page corresponding to the thumbnail in the to-be-processed document at a preset position in each thumbnail when the conversion instruction is received.
[0035] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0036] Memory, used to store computer programs;
[0037] The processor is used to implement the steps of any of the above-mentioned document conversion methods when executing the program stored in the memory.
[0038] In another aspect of the implementation of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned document conversion methods are implemented.
[0039] In another aspect of the implementation of the present invention, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of any of the above-mentioned document conversion methods.
[0040] A document conversion method provided by an embodiment of the present invention can display thumbnails of each document page contained in the document to be processed when a conversion instruction for the document to be processed is received, and when a selection instruction input by a user is received, the thumbnail selected by the user is determined according to the selection instruction as the target thumbnail, and a new document with the same format as the document to be processed is generated as the target document according to the document page corresponding to the target thumbnail, and the target document is converted into a PDF document.
[0041] Based on the above processing, the document pages that the user needs to convert into a PDF document can be determined according to the user's selection instructions, and then, based on the determined document pages, the target document can be generated and automatically converted into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it can simplify user operations and thus improve the efficiency of document conversion.
[0042] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flowchart of a document conversion method provided by an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a thumbnail display interface provided by an embodiment of the present invention;
[0046] Figure 3 A structural diagram of a document conversion device provided by an embodiment of the present invention;
[0047] Figure 4 A structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] When a user needs to convert several pages contained in a document (which may be referred to as target document pages) into a PDF document, the user may manually extract the target document pages from the document to obtain a document containing only the target document pages (which may be referred to as the target document). Then, the user may open the target document and manually convert the target document into a PDF document.
[0050] It can be seen that in the above conversion process, the user operation is cumbersome, resulting in low efficiency of document conversion.
[0051] In order to solve the above problems, an embodiment of the present invention provides a document conversion method, which can be applied to a target application. The target application can be embedded in various office applications with document conversion functions to be called by the office application.
[0052] In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, the target application can display thumbnails of each document page contained in the document to be processed. Then, when a selection instruction input by the user is received, the target application can determine the thumbnail selected by the user (i.e., the target thumbnail in the embodiment of the present invention) according to the selection instruction, and generate a new document with the same format as the document to be processed (i.e., the target document in the embodiment of the present invention) according to the document page corresponding to the target thumbnail. Then, the target application can convert the target document into a PDF document.
[0053] Based on the above processing, the target application can determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then generate the target document based on the determined document pages and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it can simplify user operations and thus improve the efficiency of document conversion.
[0054] The document conversion method provided by the embodiment of the present invention is described in detail below through specific embodiments.
[0055] See also Figure 1 , Figure 1 A flowchart of a document conversion method provided by an embodiment of the present invention may include the following steps:
[0056] S101: In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page included in the document to be processed are displayed.
[0057] The document to be processed may be a word (electronic text) document, an Excel (electronic spreadsheet) document, or a PPT (PowerPoint, presentation) document.
[0058] In an embodiment of the invention, when a user is browsing a document (i.e., the document to be processed in the embodiment of the invention), he or she may need to convert several pages of the document to be processed into PDF documents. At this time, the user can input conversion instructions for the document to be processed into the target application.
[0059] In one implementation, an "Output to PDF" button may be provided in the display interface of the target application. When the user is browsing the document to be processed displayed in the display interface of the target application, if several pages of the document to be processed (i.e., the target document pages) need to be converted into PDF documents, the user can click the "Output to PDF" button to instruct the target application to convert the target document pages into a PDF document.
[0060] Correspondingly, the target application may display thumbnails corresponding to each document page contained in the document to be processed in the display interface.
[0061] It is understandable that, when the document to be processed is an Excel document, a document page of the Excel document may be a sheet (table page), or a document page of the Excel document may be a table in a sheet.
[0062] When the document to be processed is an Excel document, and a document page of the Excel document is a sheet, the target application can display thumbnails of the sheets contained in the Excel document in the display interface in the manner of one sheet corresponding to one thumbnail. When the document to be processed is an Excel document, and a document page of the Excel document is a table in a sheet, the target application can display thumbnails of the tables in the sheets contained in the Excel document in the display interface in the manner of one table in a sheet corresponding to one thumbnail.
[0063] In one implementation, when a user opens a document to be processed, the target application can generate thumbnails corresponding to each document page contained in the document to be processed. When a conversion instruction is received, the target application can obtain the thumbnails corresponding to each document page and display the thumbnails corresponding to each document page in the display interface.
[0064] In another implementation, upon receiving the conversion instruction, the target application may generate thumbnails corresponding to each document page contained in the document to be processed, and then display the thumbnails corresponding to each document page in the display interface.
[0065] Exemplarily, the number of document pages included in the document to be processed may be 16, and the target application may display thumbnails corresponding to each document page in the display interface in ascending order of the page numbers of each document page in the document to be processed, in a manner of 4 rows by 4 columns.
[0066] Alternatively, the target application can display thumbnails corresponding to document pages 1 to 9 in the display interface in ascending order of the page numbers of each document page in the document to be processed, in the form of 3 rows by 3 columns. When the user needs to browse the thumbnails corresponding to the remaining 7 document pages, the user can swipe up in the display interface to instruct the target application to display the thumbnails corresponding to the remaining 7 document pages in the display interface.
[0067] In addition, in order to enable the user to more quickly and accurately determine the thumbnail corresponding to the document page that needs to be converted into a PDF document from each thumbnail, the target application can also display the page number of the document page corresponding to the thumbnail in the document to be processed. Optionally, the method can also include the following steps: when a conversion instruction is received, the page number of the document page corresponding to the thumbnail in the document to be processed is displayed at a preset position in each thumbnail.
[0068] The preset position may be set by a technician based on experience. For example, the preset position may be the lower right corner of the thumbnail, or the preset position may be the upper right corner of the thumbnail, but is not limited thereto.
[0069] In one implementation, when displaying each thumbnail, for each thumbnail, the target application may display the page number of the document page corresponding to the thumbnail in the document to be processed at the lower right corner of the thumbnail.
[0070] S102: When a selection instruction input by the user is received, a thumbnail selected by the user is determined as a target thumbnail according to the selection instruction.
[0071] When the user browses the thumbnails displayed by the target application, the user can select the thumbnail corresponding to the document page that needs to be converted into a PDF document.
[0072] In one implementation, when a user needs to select a thumbnail, the user can click on the thumbnail to instruct the target application to convert the document page corresponding to the thumbnail into a PDF document. Alternatively, a selection input box can be provided in the display interface of the target application, and the user can enter the page number of the document page corresponding to the thumbnail in the document to be processed in the selection input box. Then, the target application can determine that the user needs to convert the document page corresponding to the page number into a PDF document.
[0073] For example, see Figure 2 , Figure 2A schematic diagram of a thumbnail display interface provided by an embodiment of the present invention. The thumbnail display interface may display thumbnails of multiple document pages, the number at the bottom right of each thumbnail may indicate the page number of the document page corresponding to the thumbnail in the document to be processed, and the "XXX" in each thumbnail may indicate the text content of the document page corresponding to the thumbnail.
[0074] When the user clicks the "Back" button, the thumbnail display interface can be exited.
[0075] When the user needs to select a certain thumbnail, the user can click the check box on the upper right of the thumbnail. In addition, when the user needs to select all thumbnails, the user can click the "Select All" button.
[0076] After the user finishes selecting, the user can click the "Extract" button. The number in the brackets of the "Extract" button indicates the number of thumbnails selected by the user. Then, the target application can determine the thumbnails selected by the user (ie, the target thumbnails).
[0077] S103: Generate a new document with the same format as the document to be processed according to the document page corresponding to the target thumbnail as the target document.
[0078] In one implementation, when there is only one target thumbnail, the target application may directly generate a new document containing the document page corresponding to the thumbnail and having the same format as the document to be processed.
[0079] In another implementation, when there are multiple target thumbnails, the target application may generate multiple new documents in the same format as the document to be processed.
[0080] Optionally, S103 may include the following steps:
[0081] Step 1: Receive the grouping instruction input by the user.
[0082] The grouping instruction carries a grouping method identifier, which is used to indicate the method in which the user groups the target thumbnails.
[0083] Exemplarily, if the target thumbnails include: thumbnails corresponding to document pages from page 1 to page 10 in the document to be processed, the grouping method may be: divide the target thumbnails into 2 groups, and the first group includes thumbnails corresponding to document pages from page 1 to page 3, and the second group includes thumbnails corresponding to document pages from page 4 to page 10; or, the grouping method may also be: divide the target thumbnails into 3 groups, and the first group includes thumbnails corresponding to document pages from page 1 to page 3, the second group includes thumbnails corresponding to document pages from page 4 to page 8, and the third group includes thumbnails corresponding to document pages from page 9 to page 10.
[0084] Step 2: Group the target thumbnails according to the grouping method indicated by the grouping method identifier.
[0085] The target application can group the target thumbnails according to the grouping instruction input by the user to obtain multiple groups of thumbnails.
[0086] In an embodiment of the invention, a grouping input box may be provided in the display interface of the target application, in which the user may input the page number of the document page corresponding to each group of thumbnails in the document to be processed. The target application may determine the method in which the user needs to group the target thumbnails based on the page number input by the user, and group the target thumbnails according to the grouping method.
[0087] Exemplarily, if the target thumbnails include: thumbnails corresponding to document pages 1 to 10 in the document to be processed, and the page numbers entered by the user in the grouping input box are in the form of: 1-3, 4-10, it can indicate that the user needs to divide the target thumbnails into 2 groups, and the first group includes thumbnails corresponding to document pages 1 to 3, and the second group includes thumbnails corresponding to document pages 4 to 10. Then, the target application can group the target thumbnails according to this grouping method.
[0088] Step 3: For each group of thumbnails after grouping, generate a document containing document pages corresponding to the group of thumbnails.
[0089] In one implementation, after determining the thumbnail grouping, for each group of thumbnails, the target application can generate a document (ie, target document) containing the document pages corresponding to the group of thumbnails according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
[0090] For example, if the document pages corresponding to the thumbnails in a certain group are numbered 5 and 8 respectively in the document to be processed, the target application can determine that the document page 5 in the document to be processed is the document page 1 in the target document, and the document page 8 in the document to be processed is the document page 2 in the target document, and thus, the target document can be obtained.
[0091] In another implementation, for each group of thumbnails, the target application may generate a document (ie, a target document) containing document pages corresponding to the group of thumbnails according to the order in which the user selects the group of thumbnails.
[0092] For example, if when the user selects a group of thumbnails, the document page corresponding to the first selected thumbnail has page number 5 in the document to be processed, and the document page corresponding to the next selected thumbnail has page number 1 in the document to be processed, then the target application can determine that the document page 5 in the document to be processed is the document page 1 in the target document, and the document page 1 in the document to be processed is the document page 2 in the target document, and thus, the target document can be obtained.
[0093] S104: Convert the target document into a PDF document.
[0094] In the embodiment of the invention, the target application may convert the target document into a PDF document. In addition, the target application may also store the converted PDF document locally.
[0095] In one implementation, a storage input box may be provided in the display interface of the target application, and the user may enter a target storage path in the storage input box to instruct the target application to store the converted PDF document in the target storage path.
[0096] Based on the above processing, the target application can determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then generate the target document based on the determined document pages and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it can simplify user operations and thus improve the efficiency of document conversion.
[0097] See also Figure 3 Based on the same inventive concept, corresponding to the document conversion method provided by the above embodiment of the present invention, the embodiment of the present invention further provides a document conversion device, the device comprising:
[0098] The first display module 301 is used for displaying thumbnails of each document page included in the document to be processed when receiving a conversion instruction for the document to be processed when displaying the document to be processed;
[0099] The determination module 302 is used for, when receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0100] A generating module 303, configured to generate a new document having the same format as the document to be processed as a target document according to the document page corresponding to the target thumbnail;
[0101] The conversion module 304 is used to convert the target document into a PDF document.
[0102] Optionally, the user selects multiple thumbnails;
[0103] The generating module 303 is specifically used to receive the grouping instruction input by the user, wherein the grouping instruction carries a grouping mode identifier, and the grouping mode identifier is used to indicate the mode in which the user groups the target thumbnails;
[0104] grouping the target thumbnails according to the grouping method indicated by the grouping method identifier;
[0105] For each group of thumbnails after grouping, a document including document pages corresponding to the group of thumbnails is generated.
[0106] Optionally, the generating module 303 is specifically configured to generate a document including the document pages corresponding to the group of thumbnails according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
[0107] Optionally, the generating module 303 is specifically configured to generate a document including document pages corresponding to the group of thumbnails according to the order in which the user selects the group of thumbnails.
[0108] Optionally, the device further comprises:
[0109] The second display module is used for displaying the page number of the document page corresponding to the thumbnail in the to-be-processed document at a preset position in each thumbnail when the conversion instruction is received.
[0110] Based on the above processing, the target application can determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then generate the target document based on the determined document pages and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it can simplify user operations and thus improve the efficiency of document conversion.
[0111] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.
[0112] Memory 403, used for storing computer programs;
[0113] The processor 401 is used to execute the program stored in the memory 403 to implement the following steps:
[0114] In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page included in the document to be processed are displayed;
[0115] When receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0116] Generate a new document in the same format as the document to be processed as a target document according to the document page corresponding to the target thumbnail;
[0117] Convert the target document into a PDF document.
[0118] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0119] The communication interface is used for communication between the above electronic device and other devices.
[0120] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0121] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0122] The electronic device provided based on the embodiment of the present invention can determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then generate a target document based on the determined document pages and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract the document pages and manually convert the format, it can simplify the user operation and thus improve the efficiency of document conversion.
[0123] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above document conversion methods are implemented.
[0124] Specifically, the document conversion method includes:
[0125] In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page included in the document to be processed are displayed;
[0126] When receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0127] Generate a new document in the same format as the document to be processed as a target document according to the document page corresponding to the target thumbnail;
[0128] Convert the target document into a PDF document.
[0129] It should be noted that other implementations of the document conversion method are the same as those of the aforementioned method embodiment and will not be described in detail here.
[0130] By running the instructions stored in the computer-readable storage medium provided by the embodiment of the present invention, it is possible to determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then, based on the determined document pages, generate a target document and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it is possible to simplify user operations and thus improve the efficiency of document conversion.
[0131] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute the steps of any document conversion method in the above embodiments.
[0132] Specifically, the document conversion method includes:
[0133] In the case of displaying a document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page included in the document to be processed are displayed;
[0134] When receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction;
[0135] Generate a new document in the same format as the document to be processed as a target document according to the document page corresponding to the target thumbnail;
[0136] Convert the target document into a PDF document.
[0137] It should be noted that other implementations of the document conversion method are the same as those of the aforementioned method embodiment and will not be described in detail here.
[0138] By running the computer program product provided by the embodiment of the present invention, it is possible to determine the document pages that the user needs to convert into a PDF document according to the user's selection instructions, and then, based on the determined document pages, generate a target document and automatically convert it into a PDF document. Compared with the prior art, which requires the user to manually extract document pages and manually convert the format, it is possible to simplify user operations and thus improve the efficiency of document conversion.
[0139] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0140] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0141] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A document conversion method, It is characterized in that The method comprises: In the case of displaying an Excel document to be processed, when a conversion instruction for the document to be processed is received, thumbnails of each document page contained in the document to be processed are displayed; when a document page of the Excel document is a table page sheet, thumbnails of each sheet contained in the Excel document are displayed in a manner of one sheet corresponding to one thumbnail; when a document page of the Excel document is a table in a sheet, thumbnails of each table in each sheet contained in the Excel document are displayed in a manner of one table in a sheet corresponding to one thumbnail; When receiving a selection instruction input by a user, determining the thumbnail selected by the user as a target thumbnail according to the selection instruction; In the case that there is only one target thumbnail, the target application directly generates a new document containing the document page corresponding to the thumbnail and having the same format as the document to be processed; In the case where there are multiple target thumbnails, receiving a grouping instruction input by the user, wherein the grouping instruction carries a grouping mode identifier, and the grouping mode identifier is used to indicate a mode in which the user groups the target thumbnails; The target thumbnails are grouped according to the grouping method indicated by the grouping method identifier; each group of thumbnails includes at least two thumbnails; For each group of thumbnails after grouping, a document including document pages corresponding to the group of thumbnails is generated as a target document; The target document is converted into a portable document format PDF document.
2. The method according to claim 1, It is characterized in that The step of generating a document including document pages corresponding to each group of thumbnails after grouping includes: A document including the document pages corresponding to the group of thumbnails is generated according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
3. The method according to claim 1, It is characterized in that The step of generating a document including document pages corresponding to each group of thumbnails after grouping includes: According to the order in which the user selects the group of thumbnails, a document including document pages corresponding to the group of thumbnails is generated.
4. The method according to claim 1, It is characterized in that The method further comprises: When the conversion instruction is received, the page number of the document page corresponding to the thumbnail in the to-be-processed document is displayed at a preset position in each thumbnail.
5. A document conversion device, It is characterized in that The device comprises: The first display module is used for displaying a to-be-processed electronic spreadsheet Excel document, and when a conversion instruction for the to-be-processed document is received, displaying thumbnails of each document page contained in the to-be-processed document; when a document page of the Excel document is a table page sheet, displaying thumbnails of each sheet contained in the Excel document in a manner of one sheet corresponding to one thumbnail; when a document page of the Excel document is a table in a sheet, displaying thumbnails of each table in each sheet contained in the Excel document in a manner of one table in a sheet corresponding to one thumbnail; A determination module, configured to, when receiving a selection instruction input by a user, determine the thumbnail selected by the user as a target thumbnail according to the selection instruction; A generating module, configured to receive a grouping instruction input by the user, wherein the grouping instruction carries a grouping mode identifier, and the grouping mode identifier is used to indicate a mode in which the user groups the target thumbnails; The generating module is further used for, when there is only one target thumbnail, the target application program directly generates a new document in the same format as the document to be processed and including the document page corresponding to the thumbnail; The generating module is further configured to group the target thumbnails according to the grouping method indicated by the grouping method identifier when there are multiple target thumbnails; and generate a document including document pages corresponding to the group of thumbnails as the target document for each group of thumbnails after the grouping; each group of thumbnails includes at least two thumbnails; The conversion module is used to convert the target document into a PDF document.
6. The device according to claim 5, It is characterized in that The generating module is specifically configured to generate a document including the document pages corresponding to the group of thumbnails according to the arrangement order of the document pages corresponding to the group of thumbnails in the document to be processed.
7. The device according to claim 5, It is characterized in that The generating module is specifically configured to generate a document including document pages corresponding to the group of thumbnails according to the order in which the user selects the group of thumbnails.
8. The device according to claim 5, It is characterized in that The device also includes: The second display module is used for displaying the page number of the document page corresponding to the thumbnail in the to-be-processed document at a preset position in each thumbnail when the conversion instruction is received.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 4 when executing a program stored in a memory.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.
