OFD file generation method, control device, electronic device and storage medium

By converting each page of the OFD document into bitmap data and compressing and storing it, the problems of low resource utilization, large memory usage and low image formation efficiency when used in the image forming device are solved, and color consistency is achieved and efficient image formation.

CN119416740APending Publication Date: 2025-02-11BEIJING PANTUM INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411354538.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When using OFD documents in image forming devices, there are problems such as low resource utilization, large memory usage, low image formation efficiency, difficult to ensure color consistency, and the image formation operation needs to be started before loading all resources or receiving complete files. .

Method used

By converting each page of the file to be converted into the corresponding bitmap data, compressing the bitmap data and storing it in the corresponding page resource file, an OFD file is generated to ensure color consistency on different devices and reduce the color Small amount of data to improve image formation efficiency.

Benefits of technology

It realizes color consistency on different devices, reduces data volume and storage space, improves image formation efficiency, is suitable for scenes where mobile environments and image forming devices directly perform image formation operations, and allows one page of data to be received The image forming operation begins when the resource file is in the beginning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416740A_ABST
    Figure CN119416740A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an OFD file generation method, control equipment, electronic equipment and a storage medium. The method comprises the steps of obtaining a to-be-converted file; generating a directory of the OFD file based on the to-be-converted file; obtaining a target page in the to-be-converted file, wherein the target page is any page in the to-be-converted file; converting the content of the target page into corresponding bitmap data; compressing the bitmap data and then storing the compressed bitmap data in a corresponding page resource file; obtaining a page file of the target page based on the page resource file, wherein the page file is an xml file; and generating the OFD file based on the page files of all the pages of the to-be-converted file and the directory of the OFD file. According to the embodiment of the invention, all document resources do not need to be loaded into a memory in advance, and the image forming operation does not need to be executed after the complete file is received, so that the occupied space of the memory is reduced, and the image forming efficiency is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image forming technology, and in particular to an OFD file generation method, a control device, an electronic device and a storage medium. Background Art

[0002] OFD (Open Fixed layout Document) is an electronic file format that is independently controllable in my country. It has a fixed layout, does not run out of page, and what you see is what you get. Therefore, it can be regarded as the "digital paper" of the computer age. It is an ideal document format for electronic document publishing, digital information dissemination and archiving.

[0003] However, since OFD documents are in a layout format, the following problems may occur when OFD documents are applied to image forming devices:

[0004] (1) Most resources of OFD documents are stored in the document's own resource index (DocumentRes), including font files and image resources. For a continuous multi-page document, the same resource may only be used on one or several pages, and not on most pages. However, in order to process quickly, all document resources need to be loaded into memory in advance, which results in low resource utilization and occupies too much memory space, making image formation inconvenient. However, if not loaded in advance, the Res file needs to be read continuously, affecting image formation efficiency.

[0005] (2) For special files, such as PPT files with background, when stored as OFD, the background image is usually stored in Res according to the size of a whole page. When the image forming device parses this file, it will directly load the whole image into the memory, which may cause problems such as memory corruption and affect the image forming efficiency;

[0006] (3) For the special needs of mobile environments and scenarios where image forming devices directly perform image forming operations, the required file size is small, the processing power is low, and the network bandwidth is limited. Therefore, a complete OFD document will affect the image forming efficiency;

[0007] (4) Different devices have different color spaces, such as sRGB and grayscale. How to ensure color consistency on different devices when generating OFD documents becomes a key issue;

[0008] (5) The requirement of OFD format files means that the image forming operation can only be started after the entire file is received, which greatly reduces the efficiency of image forming. Summary of the invention

[0009] In view of this, the present application provides an OFD file generation method, a control device, an electronic device and a storage medium, so as to solve the problems arising when the OFD document is applied to an image forming device.

[0010] In a first aspect, an embodiment of the present application provides an OFD file generation method, which is applied to a control device, including:

[0011] Get the file to be converted;

[0012] Generate a directory of the OFD file based on the file to be converted;

[0013] Acquire a target page in the file to be converted, where the target page is any page in the file to be converted;

[0014] Converting the content of the target page into corresponding bitmap data;

[0015] Compressing the bitmap data and storing it in a corresponding page resource file;

[0016] Obtaining a page file of the target page based on the page resource file, wherein the page file is an XML file;

[0017] The OFD file is generated based on the page files of all pages of the file to be converted and the directory of the OFD file.

[0018] In a possible implementation, generating the directory of the OFD file based on the file to be converted includes:

[0019] Obtaining the page size and page number of the file to be converted;

[0020] The page size of the file to be converted is written into a root directory file as the page size of the OFD file, and the page number is written into the root directory file to generate a directory of the OFD file, wherein the root directory file is an xml file.

[0021] In a possible implementation, converting the content of the target page into corresponding bitmap data includes:

[0022] Converting the content of the target page into corresponding full-page bitmap data;

[0023] The whole page of bitmap data is segmented and cut into sections to obtain corresponding multiple bitmap data.

[0024] In a possible implementation, compressing the bitmap data and storing it in a corresponding page resource file includes:

[0025] Compressing each bitmap data separately to obtain a corresponding plurality of compressed images;

[0026] The compressed images are stored in corresponding page resource files, wherein the compressed images stored in one page resource file are derived from the same full-page bitmap data.

[0027] In a possible implementation, obtaining the page file of the target page based on the page resource file includes:

[0028] Obtaining the page file of the target page;

[0029] The compressed image is embedded into the page file in the form of an image object, wherein the embedding position of each compressed image in the page file is the segmentation starting point of the corresponding bitmap data, and the reference resource of the compressed image in the page file is the corresponding page resource file.

[0030] In a possible implementation, the method further includes:

[0031] The page size and page number of the target page are written into the page file.

[0032] In a possible implementation, after obtaining the page file, the method further includes:

[0033] Delete compressed bitmap data.

[0034] In a second aspect, an embodiment of the present application provides a control device, including:

[0035] A first acquisition unit, used to acquire a file to be converted;

[0036] A first generation file is used to generate a directory of the OFD file based on the file to be converted;

[0037] A second acquisition unit is used to acquire a target page in the file to be converted, where the target page is any page in the file to be converted;

[0038] A conversion unit, used for converting the content of the target page into corresponding bitmap data;

[0039] A storage unit, used for compressing the bitmap data and storing it in a corresponding page resource file;

[0040] An obtaining unit, used for obtaining a page file of the target page based on the page resource file, wherein the page file is an XML file;

[0041] The second generated file is used to generate the OFD file based on the page files of all pages of the file to be converted and the directory of the OFD file.

[0042] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0043] processor;

[0044] Memory;

[0045] A computer program is stored in the memory, and when the computer program is executed, the electronic device executes any one of the methods described in the first aspect.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.

[0047] Compared with the prior art, the embodiment of the present application can convert each page content of the file to be converted into corresponding bitmap data, and compress the bitmap data and store it in the corresponding page resource file, which can ensure color consistency on different devices when generating OFD documents, and can reduce the amount of data, that is, reduce the storage space occupied by the data, speed up data transmission, and is suitable for mobile environments and scenarios where image forming devices directly perform image forming operations. In addition, the embodiment of the present application can put all the resources required for one page of data of the file to be converted in one resource file, so that when processing the OFD document, the image forming operation can be started when the resource file of one page of data is received, without the need to load all document resources in advance, and without the need to receive the entire file before starting the image forming operation, thereby improving the image formation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0049] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0050] Figure 2 A flowchart of a method for generating an OFD file provided in an embodiment of the present application;

[0051] Figure 3A schematic diagram of the structure of an OFD file provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of segmenting a whole page of bitmap data provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of the structure of a control device provided in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0056] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0057] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0058] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0059] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, the application scenario includes: a control device 110 and an image forming apparatus 120, wherein the control device 110 and the image forming apparatus 120 are interconnected through a wired or wireless communication network to transmit information. During the image forming process, the control device 110 converts the print data into an OFD file, and sends the OFD file to the image forming apparatus 120, which parses the OFD file and then performs an image forming operation.

[0060] The communication network between the control device 110 and the image forming device 120 may be a local area network or a wide area network transferred through a relay device. When the communication network is a local area network, exemplarily, the communication network may be a short-distance communication network such as a wifi hotspot network, a wifi P2P network, a Bluetooth network, a zigbee network or a near field communication (NFC) network. When the communication network is a wide area network, exemplarily, the communication network may be a third-generation wireless telephone technology (3G) network, a fourth-generation mobile communication technology (4G) network, a fifth-generation mobile communication technology (5G) network, a future-evolved public land mobile network (PLMN) or the Internet.

[0061] It should be pointed out that Figure 1 This is only an exemplary description and should not be used as a limitation on the scope of protection of this application. For example, the image forming device 120 includes but is not limited to a printer, a copier, a fax machine, a multi-function image making and copying device, an electrostatic printing device, and any other similar device. The control device 110 includes but is not limited to a computer, a mobile phone, a tablet computer, an enterprise internal server, a cloud server, and other electronic devices that can communicate with the image forming device 120.

[0062] In some possible implementations, the control device 110 may also be referred to as a host computer, a host, a terminal device, etc.

[0063] OFD (Open Fixed layout Document) is an electronic file format that is independently controllable in my country. It has a fixed layout, does not run out of page, and what you see is what you get. Therefore, it can be regarded as the "digital paper" of the computer age. It is an ideal document format for electronic document publishing, digital information dissemination and archiving.

[0064] However, since OFD documents are in a layout format, the following problems may occur when OFD documents are applied to image forming devices:

[0065] (1) Most resources of OFD documents are stored in DocumentRes, including font files and image resources. For a continuous multi-page document, the same resource may only be used on one or several pages, and not on most pages. However, in order to process quickly, all document resources need to be loaded into memory in advance, which results in low resource utilization and occupies too much memory space, making image formation inconvenient. However, if not loaded in advance, Res files need to be read continuously, affecting image formation efficiency.

[0066] (2) For special files, such as PPT files with background, when stored as OFD, the background image is usually stored in Res according to the size of a whole page. When the image forming device parses this file, it will directly load the whole image into the memory, which may cause problems such as memory corruption and affect the image forming efficiency;

[0067] (3) For the special needs of mobile environments and scenarios where image forming devices directly perform image forming operations, the required file size is small, the processing power is low, and the network bandwidth is limited. Therefore, a complete OFD document will affect the image forming efficiency;

[0068] (4) Different devices have different color spaces, such as sRGB and grayscale. How to ensure color consistency on different devices when generating OFD documents becomes a key issue;

[0069] (5) The requirement of OFD format files means that the image forming operation can only be started after the entire file is received, which greatly reduces the efficiency of image forming.

[0070] In view of the above problems, the present application proposes an OFD file generation method, a control device, an electronic device and a storage medium. The present application embodiment converts each page content of the file to be converted into corresponding bitmap data, and compresses the bitmap data and stores it in the corresponding page resource file, so as to solve the problems caused when the OFD document is applied to the image forming device. The following is a detailed description with reference to the accompanying drawings.

[0071] See also Figure 2 , is a flow chart of a method for generating an OFD file provided in an embodiment of the present application. The method can be applied to Figure 1 In the control device of the application scenario shown, Figure 2 As shown, it mainly includes the following steps.

[0072] S201: Obtain a file to be converted.

[0073] In an embodiment of the present application, after the user uploads image formation data, the image formation data is obtained and used as a file to be converted, wherein the format of the file to be converted includes but is not limited to common document formats such as PDF, Word, Excel, and txt.

[0074] S202: Generate a directory of OFD files based on the files to be converted.

[0075] In an embodiment of the present application, after obtaining the file to be converted, the file to be converted is parsed to obtain the page size and page number of the file to be converted, and the page size of the file to be converted is written into the root directory file as the page size of the OFD file, and the page number is written into the root directory file, thereby generating a directory of the OFD file, wherein the root directory file is an xml file, and the page size includes the width and height of the page.

[0076] In a specific implementation, based on the parsing result of the file to be converted, multiple XML files can be created according to the hierarchical structure of the OFD file, such as Figure 3 As shown, the root directory file Document.xml is included, and then the page size and page number of each page of the file to be converted are written into Document.xml as elements in Document.xml according to the parsing result, thereby generating a directory of the OFD file.

[0077] S203: Acquire a target page in the file to be converted, where the target page is any page in the file to be converted.

[0078] In the embodiment of the present application, any page of the file to be converted can be used as the target page to obtain the page file of the target page. In the specific implementation, in order to ensure the efficiency of subsequent image formation, the target page is generally obtained in the order of page numbers, that is, the pages in the file to be converted are obtained as the target page in the order of the first page, the second page, the third page, etc. Of course, in actual applications, the user can also determine the order of obtaining the target pages according to needs, and the embodiment of the present application does not make specific requirements for this.

[0079] S204: Convert the content of the target page into corresponding bitmap data.

[0080] In an embodiment of the present application, the content of the target page can be converted into corresponding bitmap data according to the various objects contained in the target page. Specifically, in a possible implementation, the content of the target page can be converted into corresponding full-page bitmap data, and the full-page bitmap data can be segmented to obtain multiple bitmap data corresponding to the full-page bitmap data. Among them, when the full-page bitmap data is segmented, the height of each segment, i.e., the band, can be determined according to the memory and processing power of the image forming device. Generally, the memory and processing power of the image forming device are proportional to the height of the band, that is, the larger the memory of the image forming device, the higher the height of the band, and the stronger the image forming processing power, the higher the height of the band.

[0081] like Figure 4 FIG. 1 is a schematic diagram of segmenting a whole page of bitmap data provided by an embodiment of the present application. Figure 4 It can be seen that the band heights of the multiple bitmap data obtained in the embodiment of the present application are consistent, that is, the cutting of the entire page of bitmap data in the embodiment of the present application is a uniform cutting based on the band height.

[0082] The embodiment of the present application converts the content of the target page into a whole page of bitmap data, which can ensure the color consistency of the file to be converted on different devices, and segments the whole page of bitmap data into multiple bitmap data. The whole page of bitmap data can be transmitted in segments in the subsequent process, reducing the amount of data during data transmission.

[0083] Of course, in practical applications, if the memory of the image forming device is large enough and the processing capability is strong enough, the whole page of bitmap data may not be cut, that is, the whole page of bitmap data may be directly transmitted to the image forming device for processing.

[0084] S205: compressing the bitmap data and storing it in a corresponding page resource file;

[0085] In the embodiment of the present application, in order to reduce the amount of data, the bitmap data can be compressed and then stored in the corresponding page resource file. Specifically, each bitmap data can be compressed separately to obtain a corresponding plurality of compressed images, and then the compressed images are stored in the corresponding page resource file in pages, wherein the compressed images stored in one page resource file are derived from the same full page of bitmap data.

[0086] In specific implementation, Figure 3As shown, when multiple XML files are created according to the hierarchical structure of the OFD file, multiple page resource files PagesRes are also created, and the page resource files are placed in the corresponding page file Page, wherein one page resource file corresponds to one page of the file to be converted, and the page resource file is used to store the resources used by the corresponding page. Therefore, after obtaining the bitmap data, the bitmap data can be compressed and stored as a page resource in the corresponding page resource file, and the compression method includes JPEG, Flat, RLE, etc.

[0087] In the embodiment of the present application, a compressed image corresponding to a whole page of bitmap data is stored in a page resource file, so that when the image forming device performs an image forming operation, it can load a page of resource files in advance to start the operation without having to load all resource files into the memory in advance, thereby reducing the occupancy rate of memory space and improving resource utilization. That is, the embodiment of the present application does not need to receive the entire OFD file before starting the image forming operation, which greatly improves the image forming efficiency. At the same time, the embodiment of the present application compresses the whole page of bitmap data in segments. For special files such as background PPT, the amount of data transmitted at one time for the background image can be reduced, and the memory crash of the image forming device and other problems will not be caused.

[0088] S206: Obtaining a page file of the target page based on the page resource file, where the page file is an XML file.

[0089] In the embodiments of the present application, Figure 3 As shown, each page of the file to be converted has a corresponding page file Page, and the page file Page is an xml file. Therefore, for the target page, the page file of the target page can be obtained, and the page file is only a frame at this time, and then the compressed image obtained in S205 is embedded into the page file of the target page in the form of an image object, wherein the embedding position of each compressed image in the page file is the segmentation starting point of the corresponding bitmap data, and the reference resource of the compressed image in the page file is the corresponding page resource file, thereby obtaining a page file related to the content of the target page.

[0090] In a possible implementation, since the page file includes various attributes of the corresponding page, the page size and page number of the target page also need to be written into the page file.

[0091] S207: deleting the compressed bitmap data;

[0092] In an embodiment of the present application, after obtaining the page file of the target file, the compressed bitmap data can be deleted, that is, the compressed image obtained after compressing the bitmap data can be deleted to clear the local compressed image cache and release the memory occupied by the compressed image.

[0093] S208: Generate an OFD file based on the page files of all pages of the file to be converted and the directory of the OFD file.

[0094] In the embodiment of the present application, the page files of all pages in the file to be converted can be obtained according to steps S203-S206, and the page files of all pages and the target of the OFD file can be packaged to generate an OFD file.

[0095] Of course, in actual applications, when the processing power of the control device is sufficient, page files of multiple target pages can also be obtained at the same time, and the embodiment of the present application does not make specific requirements for this.

[0096] It should be noted that in the embodiment of the present application, the execution order of S207 and S208 is not specific.

[0097] The OFD file obtained in the embodiment of the present application is relatively small, requiring only lower processing power and smaller network bandwidth, and is therefore suitable for mobile devices, cloud printing, and embedded printing.

[0098] The OFD file obtained in the embodiment of the present application is usually much smaller than the source document, which helps to reduce the amount of data transmission and speed up the image formation speed, especially in a mobile network environment.

[0099] The embodiment of the present application is constructed using a portion of OFD, so the document can be displayed on all OFD readers.

[0100] The embodiments of the present application can deploy low-end consumer image forming devices and memory when the processor power is limited, but at the same time, the configurability of the language used in the embodiments of the present application can also enable high-end image forming devices to improve throughput and performance.

[0101] Corresponding to the above embodiment, the embodiment of the present application also provides a control device.

[0102] See also Figure 5 , is a schematic diagram of the structure of a control device provided in an embodiment of the present application. Figure 5As shown, the control device 500 includes: a first acquisition unit 501, used to acquire the file to be converted; a first generation file 502, used to generate a directory of the OFD file based on the file to be converted; a second acquisition unit 503, used to acquire the target page in the file to be converted, the target page is any page in the file to be converted; a conversion unit 504, used to convert the content of the target page into corresponding bitmap data; a storage unit 505, used to compress the bitmap data and store it in the corresponding page resource file; an acquisition unit 506, used to obtain the page file of the target page based on the page resource file, wherein the page file is an XML file; a second generation file 507, used to generate an OFD file based on the page files of all pages of the file to be converted and the directory of the OFD file.

[0103] The specific contents of the embodiments of the present application can be found in the description of the above method embodiments, which will not be repeated here for the sake of brevity.

[0104] Corresponding to the above embodiments, the present application also provides an electronic device.

[0105] See also Figure 6 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device 600 may include: a processor 610, a memory 620, and a communication unit 630. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiment of the present application. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0106] The communication unit 630 is used to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0107] The processor 610 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs, instructions, and / or modules stored in the memory 620, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 610 can only include a central processing unit (CPU). In the embodiment of the present application, the CPU can be a single computing core or multiple computing cores.

[0108] The memory 620 is used to store the execution instructions of the processor 610. The memory 620 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0109] When the execution instructions in the memory 620 are executed by the processor 610, the electronic device 600 can execute Figure 2 Some or all of the steps in the illustrated embodiments.

[0110] In a specific implementation, the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the data configuration method provided in the embodiment of the present application. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0111] In a specific implementation, an embodiment of the present application also provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps in each embodiment of the data configuration method provided in the embodiment of the present application.

[0112] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0113] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A method for generating an OFD file, applied to a control device, characterized in that: include: Get the file to be converted; Generate a directory of the OFD file based on the file to be converted; Acquire a target page in the file to be converted, where the target page is any page in the file to be converted; Converting the content of the target page into corresponding bitmap data; Compressing the bitmap data and storing it in a corresponding page resource file; Obtaining a page file of the target page based on the page resource file, wherein the page file is an XML file; The OFD file is generated based on the page files of all pages of the file to be converted and the directory of the OFD file.

2. The generation method according to claim 1, characterized in that: The generating the directory of the OFD file based on the file to be converted comprises: Obtaining the page size and page number of the file to be converted; The page size of the file to be converted is written into a root directory file as the page size of the OFD file, and the page number is written into the root directory file to generate a directory of the OFD file, wherein the root directory file is an xml file.

3. The generation method according to claim 1, characterized in that: The converting the content of the target page into corresponding bitmap data includes: Converting the content of the target page into corresponding full-page bitmap data; The whole page of bitmap data is segmented and cut into sections to obtain corresponding multiple bitmap data.

4. The generation method according to claim 3, characterized in that: The compressing the bitmap data and storing it in a corresponding page resource file comprises: Compressing each bitmap data separately to obtain a corresponding plurality of compressed images; The compressed images are stored in corresponding page resource files, wherein the compressed images stored in one page resource file are derived from the same full-page bitmap data.

5. The generation method according to claim 4, characterized in that: The step of obtaining the page file of the target page based on the page resource file includes: Obtaining the page file of the target page; The compressed image is embedded into the page file in the form of an image object, wherein the embedding position of each compressed image in the page file is the segmentation starting point of the corresponding bitmap data, and the reference resource of the compressed image in the page file is the corresponding page resource file.

6. The generation method according to claim 5, characterized in that: The method further comprises: The page size and page number of the target page are written into the page file.

7. The generation method according to claim 1, characterized in that: After obtaining the page file, the method further includes: Delete compressed bitmap data.

8. A control device, characterized in that: include: A first acquisition unit, used to acquire a file to be converted; A first generation file is used to generate a directory of OFD files based on the file to be converted; A second acquisition unit is used to acquire a target page in the file to be converted, where the target page is any page in the file to be converted; A conversion unit, used for converting the content of the target page into corresponding bitmap data; A storage unit, used for compressing the bitmap data and storing it in a corresponding page resource file; An obtaining unit, used for obtaining a page file of the target page based on the page resource file, wherein the page file is an XML file; The second generated file is used to generate the OFD file based on the page files of all pages of the file to be converted and the directory of the OFD file.

9. An electronic device, characterized in that: include: processor; Memory; A computer program is stored in the memory, and when the computer program is executed, the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.