Document conversion method, electronic equipment and computer readable storage medium
By adding preset identifiers to Markdown documents and generating a Markdown table of contents, the problem of missing hyperlinks when merging Markdown documents into PDF documents is solved, enabling page content navigation in PDF documents and improving the user experience.
Patent Information
- Application Number
- CN202411524021.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology cannot retain the original hyperlink function when combining multiple Markdown documents into a single PDF document, resulting in the loss of page content navigation functionality.
By obtaining the title information of the Markdown document and adding preset identifier information, a Markdown table of contents is generated. The page number information is obtained by using the page number attribute of the JSON file, and a Markdown table of contents that supports navigation is generated. Finally, the Markdown document is converted into a PDF document, retaining the hyperlink function.
It enables the preservation of hyperlinks in PDF documents, enriching the application functions of PDF documents and improving the user's reading experience.
Smart Images

Figure CN119047428A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text processing, and in particular to a document conversion method, an electronic device and a computer-readable storage medium. Background Art
[0002] Markdown is a lightweight markup language with simple syntax and is easy to use. It writes documents in plain text format, relies on the keyboard rather than the mouse, and focuses on the writing itself. It is deeply loved by users; PDF is an electronic file format that is universal in major operating systems, has strong cross-platform capabilities, and has the characteristics of being difficult to tamper with and ensuring file integrity, making PDF an ideal document format for electronic document distribution and digital information dissemination on the Internet.
[0003] For document workers, there is often a need to convert Markdown documents into PDF documents. If you want to convert a single Markdown document into a PDF document, you can use the open source programs in the existing technology to achieve it. However, if you want to combine multiple Markdown documents into a whole PDF document, you must first convert each Markdown document into a corresponding PDF document, and then use other open source programs to complete the merger of all PDF documents to form a whole PDF document. Although this can convert Markdown documents into PDF documents, the original hyperlink function in the Markdown document is lost, and page content jump cannot be achieved. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, the present invention provides a document conversion method, an electronic device and a computer-readable storage medium, which can retain the original hyperlink function after the document is converted, so as to facilitate page content jump.
[0005] In a first aspect, an embodiment of the present invention provides a document conversion method, comprising: Acquire multiple Markdown documents and configuration information of the multiple Markdown documents, wherein the configuration information includes preset organization order information of the multiple Markdown documents and address information of each Markdown document; For each of the Markdown documents, obtaining the title information of the Markdown document according to the address information of the Markdown document and the acquired preset grammar rule information of the Markdown document; According to the preset organization sequence information of the multiple Markdown documents, the multiple Markdown documents are merged in a preset arrangement order to obtain a first Markdown document; Traversing the title information of all the Markdown documents in the first Markdown document, and adding corresponding preset identification information to each of the title information, to obtain a second Markdown document; Convert the second Markdown document into a transitional PDF document, convert the transitional PDF document into a json file, and obtain the page number information of each preset identification information in the json file; Generate a Markdown directory according to all the page number information and the title information and the preset identification information respectively corresponding to each of the page number information; A target PDF document is obtained according to the Markdown directory and the first Markdown document.
[0006] Optionally, in one embodiment of the present invention, obtaining a target PDF document according to the Markdown directory and the first Markdown document includes: Add the Markdown directory to the first page of the first Markdown document to obtain a third Markdown document; The third Markdown document is converted into a target PDF document.
[0007] Optionally, in one embodiment of the present invention, after converting the third Markdown document into a target PDF document, the method further includes: Get the number of PDF pages occupied by the Markdown directory in the target PDF document; According to the number of PDF pages, corresponding body page number information is added to the target PDF document to obtain a first PDF document.
[0008] Optionally, in an embodiment of the present invention, when the configuration information further includes preset page layout information of each Markdown document, the preset page layout information includes at least one of preset header information, preset footer information and preset watermark information, the method further includes: According to the preset page layout information, corresponding body page layout information is added to the first candidate PDF document to obtain a second PDF document, wherein the first candidate PDF document is the target PDF document or the first PDF document.
[0009] Optionally, in one embodiment of the present invention, the method further includes: Generate PDF navigation information corresponding to the Markdown directory according to the Markdown directory; The PDF navigation information is merged with a second candidate PDF document to obtain a third PDF document, wherein the second candidate PDF document is any one of the target PDF document, the first PDF document and the second PDF document.
[0010] Optionally, in one embodiment of the present invention, the method further includes: Obtain a pre-generated cover template, and convert the cover template into a cover PDF document; The cover PDF document and the third candidate PDF document are merged to obtain a fourth PDF document, wherein the third candidate PDF document is any one of the target PDF document, the first PDF document, the second PDF document and the third PDF document.
[0011] Optionally, in one embodiment of the present invention, for each of the Markdown documents, the preset identification information corresponding to the title information of the Markdown document is different from any document content in the Markdown document.
[0012] In a second aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the document conversion method as described in the first aspect is implemented.
[0013] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing a program executable by a processor, wherein the program executable by the processor is used to implement the document conversion method as described in the first aspect when executed by the processor.
[0014] The document conversion method, electronic device and computer-readable storage medium proposed in the present invention respectively add preset identification information to each title information when obtaining the title information of each Markdown document, so as to specially identify each title information accordingly, and then, when generating a json file, use the page number attribute of the json file itself to respectively obtain the page number information where each preset identification information is located in the json file, so as to generate a Markdown directory supporting jumps based on all page number information, and finally obtain the target PDF document according to the Markdown directory and the first Markdown document; in the Markdown directory integrated with the target PDF document, the title information after adding the corresponding preset identification information can be used as jump information for providing a hyperlink function, so as to facilitate the converted target PDF document to realize page content jump, which not only enriches the application function of the target PDF document, but also can improve the reading experience of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of a document conversion method provided by an embodiment of the present invention; Figure 2 yes Figure 1 Flowchart of step S7000 in FIG. Figure 3 yes Figure 2 The flowchart after step S7200 in FIG. Figure 4 is a flowchart of a document conversion method provided by another embodiment of the present invention; Figure 5 is a flowchart of a document conversion method provided by another embodiment of the present invention; Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0017] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0018] The present invention provides a document conversion method, an electronic device and a computer-readable storage medium, wherein the document conversion method comprises: obtaining multiple Markdown documents and configuration information of the multiple Markdown documents, wherein the configuration information comprises preset organization sequence information of the multiple Markdown documents and address information of each Markdown document; for each Markdown document, obtaining the title information of the Markdown document according to the address information of the Markdown document and the preset grammatical rule information of the acquired Markdown document; merging the multiple Markdown documents according to a preset arrangement order according to the preset organization sequence information of the multiple Markdown documents to obtain a first Markdown document; traversing the title information of all Markdown documents in the first Markdown document, respectively adding corresponding preset identification information to each title information to obtain a second Markdown document; converting the second Markdown document into a transitional PDF document, converting the transitional PDF document into a json file, respectively obtaining the page number information of each preset identification information in the json file; generating a Markdown directory according to all page number information and the title information and preset identification information respectively corresponding to each page number information; and obtaining a target PDF document according to the Markdown directory and the first Markdown document. In the present invention, when the title information of each Markdown document is obtained, preset identification information is added to each title information respectively, so as to specially identify each title information accordingly, and then when a json file is generated, the page number information of each preset identification information in the json file is obtained respectively by utilizing the page number attribute of the json file itself, so as to generate a Markdown directory supporting jumps based on all page number information, and finally obtain the target PDF document according to the Markdown directory and the first Markdown document; in the Markdown directory integrated with the target PDF document, the title information after adding the corresponding preset identification information can be used as jump information for providing a hyperlink function, so as to facilitate the converted target PDF document to realize page content jump, which not only enriches the application function of the target PDF document, but also can improve the reading experience of the user.
[0019] Figure 1 This is a flowchart of a document conversion method provided by an embodiment of the present invention. The document conversion method may include but is not limited to steps S1000 to S7000.
[0020] Step S1000: Acquire multiple Markdown documents and configuration information of the multiple Markdown documents, wherein the configuration information includes preset organization order information of the multiple Markdown documents and address information of each Markdown document; Step S2000: for each Markdown document, obtaining the title information of the Markdown document according to the address information of the Markdown document and the acquired preset grammar rule information of the Markdown document; Step S3000: merging the multiple Markdown documents in a preset arrangement order according to the preset organization order information of the multiple Markdown documents to obtain a first Markdown document; Step S4000: traverse the title information of all Markdown documents in the first Markdown document, add corresponding preset identification information to each title information, and obtain a second Markdown document; Step S5000: converting the second Markdown document into a transitional PDF document, converting the transitional PDF document into a json file, and obtaining the page number information of each preset identification information in the json file; Among them, JSON is an open standard file format and data exchange format, which is easy to read and write, and easy to machine parse and generate. It is independent of language design. Most programming languages support data exchange in JSON format. Its concise and clear hierarchical structure effectively improves network transmission efficiency, making JSON an ideal data exchange language. Its files usually use the extension .json; Step S6000: Generate a Markdown directory based on all page number information and title information and preset identification information corresponding to each page number information; Step S7000: Obtain a target PDF document according to the Markdown directory and the first Markdown document.
[0021] In this step, when the title information of each Markdown document is obtained, preset identification information is added to each title information respectively to specially identify each title information accordingly, and then when a json file is generated, the page number information of each preset identification information in the json file is obtained by utilizing the page number attribute of the json file itself, so as to generate a Markdown directory that supports jumps based on all page number information, and finally obtain the target PDF document according to the Markdown directory and the first Markdown document; in the Markdown directory integrated with the target PDF document, the title information after adding the corresponding preset identification information can be used as jump information to provide a hyperlink function, so as to facilitate the converted target PDF document to realize page content jump, which not only enriches the application function of the target PDF document, but also can enhance the user's reading experience.
[0022] In one embodiment, the preset organizational order information of multiple Markdown documents can be set according to the specific application scenario, and there is no limitation here. For example, among three Markdown documents, the order of one of the Markdown documents can be set to the second place. Then in step S3000, when the three Markdown documents are merged according to the preset arrangement order, the Markdown document is in the second place in the preset arrangement order, and finally the first Markdown document is obtained by merging according to the preset arrangement order; the address information of each Markdown document is inherent information, which can be determined and recorded in advance by text search and the like. When needed, such as in step S2000, the address information of each Markdown document can be directly called.
[0023] In one embodiment, when determining the address information of a Markdown document, there may be multiple ways to obtain the title information of the Markdown document in step S2000 by combining the preset grammar rule information of the Markdown document with the address information of the Markdown document, which are not limited here. For example, the preset grammar rule information of a Markdown document is: the content starting from the next character after the "#" character is the first-level title, the content starting from the next character after the "##" character is the second-level title, and so on; if the first line of the Markdown document is written as the main title of this Markdown document, the main title of the Markdown document can be obtained by reading the character content after the first "#" character in the Markdown document, and the sub-title can also be obtained in a similar way, which is not elaborated here.
[0024] In one embodiment, the preset identification information added for each title information in step S4000 can be, but is not limited to, used to locate the position of the corresponding Markdown document in the first Markdown document. The preset identification information can be a preset special character, and the position where the special character is added can be, but is not limited to, the next character position after the title information, such as "☆", "◇", etc., which is not limited here.
[0025] It should be noted that for each Markdown document, the preset identification information corresponding to the title information of the Markdown document should be different from any document content in the Markdown document. This ensures that there will be no repeated character interference when retrieving and searching for the preset identification information, that is, ensuring that the preset identification information is unique, so that it can play a stable and reliable identification role.
[0026] In one embodiment, the Markdown directory in step S6000 is a directory in Markdown format. Sub-directories can be generated for page number information where different preset identification information is located, and then summarized to obtain the final Markdown directory. That is, for each page number information, a sub-directory is first generated according to the page number information and its corresponding title information and preset identification information. Similarly, all sub-directories can be obtained, and finally all sub-directories are summarized to obtain the Markdown directory.
[0027] In one embodiment, the second Markdown document can be converted into a transitional PDF document through a preset first open source program, but is not limited to, and then the transitional PDF document can be converted into a json file through a preset second open source program. The first open source program and the second open source program can be set accordingly according to the specific application scenario, which is not limited here. For example, the first open source program can be but is not limited to "mdtopdf", and the second open source program can be but is not limited to "pdf2json".
[0028] One embodiment of the present invention, as Figure 2 As shown, step S7000 may include but is not limited to steps S7100 to S7200.
[0029] Step S7100: Add the Markdown directory to the homepage of the first Markdown document to obtain a third Markdown document; Step S7200: Convert the third Markdown document into a target PDF document.
[0030] In this step, when a Markdown directory is generated, the Markdown directory is added to the homepage of the first Markdown document, thereby forming a new third Markdown document with a Markdown directory that supports jumps. Finally, the third Markdown document is converted into a target PDF document to obtain a target PDF document that meets the requirements. The target PDF document can realize page content jumps, which not only enriches the application functions of the target PDF document, but also can further enhance the user's reading experience.
[0031] It should be noted that the third Markdown document can be converted into the target PDF document through, but is not limited to, the first open source program.
[0032] One embodiment of the present invention, as Figure 3 As shown, step S7200 may include but is not limited to steps S8000 to S9000.
[0033] Step S8000: Obtain the number of PDF pages occupied by the Markdown directory in the target PDF document; Step S9000: adding corresponding body page number information to the target PDF document according to the number of PDF pages to obtain a first PDF document.
[0034] In this step, by obtaining the number of PDF pages occupied by the Markdown directory in the target PDF document, the distribution of the Markdown directory in the target PDF document is learned, and then the corresponding body page number information is added to the target PDF document according to the distribution. That is, it is necessary to add the corresponding body page number information for the number of PDF pages occupied by the Markdown directory to obtain the first PDF document, which facilitates the effective and reliable search of the Markdown directory through the body page numbers in the first PDF document. Among them, the setting method of the body page number information can be set by yourself according to the specific application scenario, which is not limited here. For example, it can be set to be sorted continuously by numbers, sorted continuously by sections, etc., but is not limited to.
[0035] In one embodiment of the present invention, when the configuration information also includes preset page layout information of each Markdown document, the preset page layout information includes at least one of preset header information, preset footer information and preset watermark information, the document conversion method may also include but is not limited to step S10000.
[0036] Step S10000: adding corresponding body page layout information to a first candidate PDF document according to preset page layout information to obtain a second PDF document, wherein the first candidate PDF document is a target PDF document or a first PDF document.
[0037] In this step, when the preset page layout information corresponding to each Markdown document is known, the corresponding body page layout information can be added to the target PDF document or the first PDF document according to the preset page layout information. That is to say, the specific layout of each Markdown document is applied to the target PDF document or the first PDF document, thereby obtaining a second PDF document to further enhance the reading experience of the PDF document.
[0038] It should be noted that, according to the requirements of specific application scenarios, one can be selected from the target PDF document and the first PDF document as the first alternative PDF document, and the third Markdown document can be converted into the target PDF document through but not limited to a preset third open source program, wherein the third open source program can be set accordingly according to the specific application scenario, which is not limited here. For example, the third open source program can be but not limited to "pdf-lib / fontkit".
[0039] One embodiment of the present invention, as Figure 4 As shown, the document conversion method may also include but is not limited to steps S11000 to S12000.
[0040] Step S11000: Generate PDF navigation information corresponding to the Markdown directory according to the Markdown directory; Step S12000: merging the PDF navigation information with the second candidate PDF document to obtain a third PDF document, wherein the second candidate PDF document is any one of the target PDF document, the first PDF document and the second PDF document.
[0041] In this step, PDF navigation information corresponding to the Markdown directory can be generated according to the Markdown directory, that is, the PDF navigation function is realized through the Markdown directory, and then the PDF navigation information is merged with the second alternative PDF document to obtain a third PDF document, so as to further enhance the reading experience of the PDF document.
[0042] It should be noted that, according to the requirements of specific application scenarios, one document may be selected from the target PDF document, the first PDF document and the second PDF document as the second candidate PDF document.
[0043] One embodiment of the present invention, as Figure 5 As shown, the document conversion method may also include but is not limited to steps S13000 to S14000.
[0044] Step S13000: Obtain a pre-generated cover template, and convert the cover template into a cover PDF document; Step S14000: merging the cover PDF document and the third candidate PDF document to obtain a fourth PDF document, wherein the third candidate PDF document is any one of the target PDF document, the first PDF document, the second PDF document and the third PDF document.
[0045] In this step, the corresponding cover PDF document is converted based on the pre-generated cover template to clearly display the cover content, and then the cover PDF document and the third alternative PDF document are merged to obtain a fourth PDF document to further enhance the reading experience of the PDF document.
[0046] It should be noted that, according to the requirements of specific application scenarios, one can be selected from the target PDF document, the first PDF document, the second PDF document and the third PDF document as the third alternative PDF document, and the cover template can be converted into a cover PDF document through but not limited to the first open source program, and the cover PDF document and the third alternative PDF document can be merged with the first open source program or the third open source program.
[0047] In one embodiment, the cover template may be pre-generated through, but not limited to, an XML document or a Markdown document, and may be dynamically customized through, but not limited to, corresponding open source programs to achieve cover content.
[0048] It is worth noting that the text fonts, text paragraphs, image colors, positions, formats, sizes, etc. of the PDF documents involved in the above embodiments can be customized through, but not limited to, corresponding open source programs, and there is no restriction here.
[0049] Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device 1000 provided by an embodiment of the present invention. Figure 6 As shown, the electronic device 1000 includes a memory 1100 and a processor 1200. The number of the memory 1100 and the processor 1200 may be one or more. Figure 6 In the embodiment, a memory 1100 and a processor 1200 are taken as an example; the memory 1100 and the processor 1200 in the device may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0050] The memory 1100 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the document conversion method provided in any embodiment of the present invention. The processor 1200 implements the above document conversion method by running the software programs, instructions, and modules stored in the memory 1100.
[0051] The memory 1100 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. In addition, the memory 1100 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0052] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the document conversion method provided in any embodiment of the present invention.
[0053] An embodiment of the present invention further provides a computer program product, including a computer program or computer instructions, wherein the computer program or computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes a document conversion method as provided in any embodiment of the present invention.
[0054] The electronic devices and application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of electronic devices and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
[0055] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0056] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0057] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process or an execution thread, and a component may be located on a computer or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may communicate, for example, through local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems through signals).
Claims
1. A document conversion method, characterized in that: include: Acquire multiple Markdown documents and configuration information of the multiple Markdown documents, wherein the configuration information includes preset organization order information of the multiple Markdown documents and address information of each Markdown document; For each of the Markdown documents, obtaining the title information of the Markdown document according to the address information of the Markdown document and the acquired preset grammar rule information of the Markdown document; According to the preset organization sequence information of the multiple Markdown documents, the multiple Markdown documents are merged in a preset arrangement order to obtain a first Markdown document; Traversing the title information of all the Markdown documents in the first Markdown document, and adding corresponding preset identification information to each of the title information, to obtain a second Markdown document; Convert the second Markdown document into a transitional PDF document, convert the transitional PDF document into a json file, and obtain the page number information of each preset identification information in the json file; Generate a Markdown directory according to all the page number information and the title information and the preset identification information respectively corresponding to each of the page number information; A target PDF document is obtained according to the Markdown directory and the first Markdown document.
2. The document conversion method according to claim 1, characterized in that: The step of obtaining a target PDF document according to the Markdown directory and the first Markdown document includes: Add the Markdown directory to the first page of the first Markdown document to obtain a third Markdown document; The third Markdown document is converted into a target PDF document.
3. The document conversion method according to claim 2, characterized in that: After converting the third Markdown document into a target PDF document, the method further includes: Get the number of PDF pages occupied by the Markdown directory in the target PDF document; According to the number of PDF pages, corresponding body page number information is added to the target PDF document to obtain a first PDF document.
4. The document conversion method according to claim 3, characterized in that: When the configuration information further includes preset page layout information of each Markdown document, the preset page layout information includes at least one of preset header information, preset footer information and preset watermark information, the method further includes: According to the preset page layout information, corresponding body page layout information is added to the first candidate PDF document to obtain a second PDF document, wherein the first candidate PDF document is the target PDF document or the first PDF document.
5. The document conversion method according to claim 4, characterized in that: The method further comprises: Generate PDF navigation information corresponding to the Markdown directory according to the Markdown directory; The PDF navigation information is merged with a second candidate PDF document to obtain a third PDF document, wherein the second candidate PDF document is any one of the target PDF document, the first PDF document and the second PDF document.
6. The document conversion method according to claim 5, characterized in that: The method further comprises: Obtain a pre-generated cover template, and convert the cover template into a cover PDF document; The cover PDF document and the third candidate PDF document are merged to obtain a fourth PDF document, wherein the third candidate PDF document is any one of the target PDF document, the first PDF document, the second PDF document and the third PDF document.
7. The document conversion method according to any one of claims 1 to 6, characterized in that: For each of the Markdown documents, the preset identification information corresponding to the title information of the Markdown document is different from any document content in the Markdown document.
8. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the document conversion method according to any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium, characterized in that: A processor-executable program is stored therein, and when the processor-executable program is executed by the processor, it is used to implement the document conversion method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Document generation method and system based on Markdown markup language
CN113342321A
Document merging method, terminal and computer readable storage medium
CN116451683A
Document file efficient automatic annotation method realized based on Hash tree algorithm
CN116956836A
Document processing method, device and equipment and computer readable storage medium
CN118796764A
Natural language processing on semi-structured data
US11847406B1
Cited By
Webpage PDF exporting method based on VitePress
CN119830862A
