CN109948123B - Image merging method and device - Google Patents

Image merging method and device Download PDF

Info

Publication number
CN109948123B
CN109948123B CN201811429317.1A CN201811429317A CN109948123B CN 109948123 B CN109948123 B CN 109948123B CN 201811429317 A CN201811429317 A CN 201811429317A CN 109948123 B CN109948123 B CN 109948123B
Authority
CN
China
Prior art keywords
page
image file
obtaining
background image
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811429317.1A
Other languages
Chinese (zh)
Other versions
CN109948123A (en
Inventor
刘会淼
陈家大
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201811429317.1A priority Critical patent/CN109948123B/en
Publication of CN109948123A publication Critical patent/CN109948123A/en
Application granted granted Critical
Publication of CN109948123B publication Critical patent/CN109948123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

An image merging method and device are disclosed. An image merging method, the method comprising: obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format; obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file; writing the merging requirement information into an object list of the target page to obtain a merged page object list; and analyzing the combined page object list, and rendering to generate a combined image in which the target image file is embedded into the background image file.

Description

Image merging method and device
Technical Field
The embodiment of the specification relates to the technical field of internet application, in particular to an image merging method and device.
Background
The color mode of the display of the electronic device is RGB mode, and the color mode of the image printing is CMYK mode, so in order to avoid color difference when printing electronic images, the image file to be printed generally adopts PDF format supporting CMYK mode.
When a PDF image to be printed is produced, a common portion and a customized portion may exist in the same image. For example, in the off-line code scanning payment scene, as shown in fig. 1, two-dimensional codes of different merchants are different, that is, a two-dimensional code part in the image is a customized part, and other information around the two-dimensional code as a background is generally a general part. When the cash register images of different merchants are required to be manufactured, the manufacturing efficiency can be improved by embedding the custom part into the universal part.
When 2 PDF format images are combined in the prior art, the images are generally required to be re-analyzed and rendered, the combining efficiency is low, and the combined files are larger; alternatively, it is necessary to remove part of the information of the image before merging, resulting in deviation of the information of the image after merging from the color. Based on the prior art, there is a need for a more efficient and accurate image merging scheme.
Disclosure of Invention
Aiming at the technical problems, the embodiment of the specification provides an image merging method and device, and the technical scheme is as follows:
an image merging method, the method comprising:
obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
writing the merging requirement information into an object list of the target page to obtain a merged page object list;
and analyzing the combined page object list, and rendering to generate a combined image in which the target image file is embedded into the background image file.
An image merging apparatus, the apparatus comprising:
the list obtaining module is used for obtaining an object list of a target page in the background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
the demand acquisition module is used for acquiring the merging demand information of the target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
the list updating module is used for writing the merging requirement information into the object list of the target page to obtain a merged page object list;
and the image generation module is used for analyzing the combined page object list, and rendering and generating a combined image with the target image file embedded in the background image file.
According to the technical scheme provided by the embodiment of the specification, for PDF image files to be combined, a page object list in the PDF format file is utilized, one image file is used as an object in a page, the object in a target page of the other image file is added, and the object list of the target page is updated, so that the combined image can be analyzed, rendered and generated through the updated (equivalent to the combined) page object list.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the embodiments of the disclosure.
Further, not all of the effects described above need be achieved in any of the embodiments of the present specification.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present description, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a schematic diagram of a generic part and a custom part of a merged image according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of an image merging method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of the main structure of a PDF file of the embodiment of the present specification;
fig. 4 is a schematic view of a PDF file hierarchy of the embodiment of the present specification;
FIG. 5 is a schematic diagram of a generic part and a custom part to be combined according to an embodiment of the present disclosure;
fig. 6 is a schematic structural view of an image combining device of the embodiment of the present specification;
fig. 7 is a schematic diagram of an apparatus for configuring the device of the embodiment of the present specification.
Detailed Description
In order for those skilled in the art to better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification shall fall within the scope of protection.
In an image merging scheme in the prior art, different PDF image files are needed to be sequentially parsed and rendered to the same medium (such as a virtual canvas), and then the medium content with 2 images rendered is stored as a PDF file, so that the merged image file can be obtained. Obviously, the merging efficiency of the scheme is lower, and the merged image file is larger.
In another image merging scheme in the prior art, a certain merging format can be preset, then 2 image files to be merged are merged according to the format, and the efficiency of generating PDF files after being merged is improved by a way of merging with less information, but the scheme loses more information, so that the merged image has deviation of information and color.
In view of the above problems, the embodiments of the present disclosure provide an image merging method, as shown in fig. 2, which may include the following steps:
s101, obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
as a structured file format, objects such as directories, pages, images and the like in PDF may be presented in PDF documents by way of reference, and not sequentially and arbitrarily, for example, one PDF file has 3 pages, and page 3 may be presented before page 1, but in PDF files displayed after time resolution by way of reference order, pages 1 to 3 may be presented sequentially, thereby making the PDF document more readable.
The main structure of a PDF file may be as shown in fig. 3, in which the version number of the PDF specification to which the file conforms is specified in the header, which appears in the first line of the PDF file. The file body is also called an object set, and the main part of the PDF file consists of a series of objects. The cross-reference table is an address index table set up to facilitate random access of objects, and typically stores object addresses in an offset indexed manner. The file end declares the address of the cross-reference table and indicates the root directory of the file body, so that the position of each object in the PDF file can be found to achieve random access.
The hierarchical structure of a PDF file may be as shown in fig. 4, where the root directory is indicated by the end of the file, and the page directory and the outline directory are referenced in the root directory. The large outline is a bookmark tree of a PDF file; the page directory contains the page number of the PDF file and the reference mark of each page. The page object is the most important object in the PDF, and the page information includes information how to display the page, for example, an object list including attribute information of each object in the recording page, and the attribute information may be, for example, a used font, a contained content (text, picture, etc.), a size of the page, and the like.
The image included in the background image file in this embodiment may be a general part or a custom part, and the image included in the target image file may be a custom part or a general part, which is not limited in this description, but the background image file is a PDF file, but the format of the target image file is not limited, and may be PDF, JPG, PNG or the like.
In addition, the background image file can comprise a plurality of pages, the image in the target image file can be embedded into a certain page, and the embedded image can be directly printed to generate an image object to be used according to the image file obtained after the combination.
In the scheme, before the object list of the target page in the background image file is obtained, the file header can be checked first, and the background image file is determined to be a file in PDF format according to the version number in the file header. The file tail can also be checked, information in the file tail is read, and the integrity of the background image file is determined.
In this scheme, when obtaining the object list of the target page in the background image file, the target page to be embedded in the target image in the background image file may be first determined, and then the cross-reference table of the background image file is obtained by analyzing the tail of the background image file, for example, the tail of the background image file may be analyzed, and the address of the cross-reference table declared in the tail may be determined according to the preset declaration character.
Thus, the object list of the target page can be obtained according to the addresses referenced in the cross-reference table, for example, the cross-reference table is resolved to obtain the addresses of the referenced objects recorded in the table, the file tail of the background image file is resolved to obtain the reference identification of the root directory, then the root directory is obtained according to the reference identification of the root directory and the addresses recorded in the cross-reference table, and the object list of the target page is obtained according to the page information recorded in the root directory.
As an example, the root directory may be parsed to obtain a reference identifier of a page directory, and the page directory may be obtained according to the reference identifier of the page directory and an address recorded in the cross-reference table, where the page directory includes: the number of pages in the background image file and the reference identification of each page. And obtaining an object list of the target page according to the reference identification of the target page in the page directory, for example, analyzing the page directory, obtaining the reference identification of the target page, and obtaining the page information of the target page according to the reference identification of the target page and the address recorded in the cross reference table, so as to analyze the obtained page information and obtain the object list of the target page.
S102, obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
s103, writing the merging requirement information into an object list of the target page to obtain a merged page object list;
s104, analyzing the combined page object list, and rendering to generate a combined image with the target image file embedded in the background image file.
For convenience of description, S102 to S104 will be described in combination.
The merging requirement information of the target image file can comprise binary information obtained by binary reading the target image file, and the reference to the target image is realized through binary reading; information on the position, size, etc. in the target page after the image in the target image file is embedded may also be included. After the merging requirement information is written into the object list of the target page, a merged page object list can be obtained, and the attribute information included in the list describes the image obtained by merging the universal part and the customized part.
In this scheme, the merging requirement information is written into the object list of the target page, and after the merged page object list is obtained, the page information of the target page and the cross reference table can be further updated according to the merged page object list, and then the address of the cross reference table declared in the file tail is updated according to the updated cross reference table. In addition, the contents of the page directory and the root directory may be updated. Of course, when updating is performed, the original content can be directly copied in the same part as the content in the background image file before merging.
The image merging method provided in the present specification will be described with reference to a more specific example.
Assume that the images to be combined are respectively shown as (a) (b) in fig. 5, wherein the image shown in (a) is included in a background image file in PDF format, the image shown in (b) is a target image file in JPG format, and the image (b) needs to be embedded in the image (a).
First, the header of the background image file is checked, it is determined to be a PDF file, and the end of the file is checked, determining the integrity of the file. And then analyzing the file tail to obtain the starting point information of the cross reference table, thereby obtaining the position of the cross reference table.
And analyzing and obtaining the content of the cross reference table according to the positions, namely obtaining the total number of objects in the background image file, the reference identification of each object and the positions in the file, which are recorded in the cross reference table. In addition, the file tail is analyzed to obtain the reference identifier of the root directory, and the position of the root directory is obtained according to the corresponding relation between the object reference identifier and the position recorded in the cross reference table.
And analyzing and obtaining the content of the background image file root directory according to the positions so as to obtain the reference identification of the page directory, and obtaining the position of the page directory according to the corresponding relation between the object reference identification and the position recorded in the cross reference table.
And analyzing and obtaining the positions of the page catalogs according to the positions to obtain the number of pages in the background image file and the reference marks of all the pages, and obtaining the positions of the target pages according to the corresponding relation between the object reference marks and the positions recorded in the cross reference table.
And analyzing and obtaining page information of the target page according to the position, wherein the page information comprises page size, an image resource list in the page, a Contents list and the like.
The binary system reads the target image file, takes the read binary system information as a new object, adds the new object into the image resource list, and adds drawing information such as the position, transformation, size and the like of the target image in the target page to the tail of the Contents list.
And updating the cross reference table according to the added content, rewriting the file tail, and re-indicating the position of the updated cross reference table in the file tail to obtain the combined PDF file. The PDF file is analyzed and rendered, so that the combined image (shown on the left side of FIG. 1) can be displayed.
Therefore, if the scheme in the prior art is adopted, the parsing and rendering of all objects in the PDF file are needed, including decoding the picture objects, marking the path objects, inquiring and rendering the text objects, and the like, and when the scheme is applied, the parsing and rendering of all objects in the PDF file can be avoided, a new picture object is directly added semantically, and all information and contents of the source file can be reserved, so that the image merging of the PDF file can be efficiently and accurately realized.
Corresponding to the above method embodiment, the embodiment of the present disclosure further provides an image merging device, as shown in fig. 6, which may include:
a list obtaining module 110, configured to obtain an object list of a target page in a background image file, where the object list includes attribute information of each object in the page; the background image file is in a PDF format;
a requirement obtaining module 120, configured to obtain merging requirement information of the target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
the list updating module 130 is configured to write the merging requirement information into the object list of the target page to obtain a merged page object list;
the image generating module 140 is configured to parse the merged page object list, and render and generate a merged image in which the target image file is embedded in the background image file.
In one specific embodiment provided in the present specification, the list obtaining module 110 may include:
the page determining submodule is used for determining a target page to be embedded with a target image in the background image file;
the file tail analysis sub-module is used for analyzing the file tail of the background image file and obtaining a cross-reference table of the background image file;
and the list obtaining sub-module is used for obtaining the object list of the target page according to the addresses referenced in the cross reference table.
In a specific embodiment provided in the present specification, the end-of-file parsing sub-module may specifically be used for:
analyzing the file tail of the background image file, and determining the address of a cross reference table declared in the file tail according to a preset declaration character;
and obtaining the cross reference table of the background image file according to the address of the cross reference table.
In a specific embodiment provided in the present specification, the list obtaining submodule may include:
a reference table analyzing unit for analyzing the cross reference table to obtain the address of the referenced object recorded in the table;
the file tail analyzing unit is used for analyzing the file tail of the background image file and obtaining the reference mark of the root directory;
a root directory obtaining unit, configured to obtain the root directory according to a reference identifier of the root directory and an address recorded in the cross reference table;
and the list obtaining unit is used for obtaining the object list of the target page according to the page information recorded by the root directory.
In a specific embodiment provided in the present specification, the list obtaining unit may include:
the root directory analyzing unit is used for analyzing the root directory and obtaining the reference identification of the page directory;
a page directory obtaining subunit, configured to obtain the page directory according to a reference identifier of the page directory and an address recorded in the cross reference table; the page directory includes: the number of pages in the background image file and the reference mark of each page;
and the list obtaining subunit is used for obtaining the object list of the target page according to the reference identification of the target page in the page directory.
In a specific embodiment provided in the present specification, the list obtaining subunit may specifically be used to:
analyzing the page directory to obtain the reference identification of the target page;
acquiring page information of the target page according to the reference identification of the target page and the address recorded in the cross reference table;
and analyzing the obtained page information to obtain an object list of the target page.
In a specific embodiment provided in the present disclosure, the list updating module is configured to write the merging requirement information into the object list of the target page, and after obtaining the merged page object list, may be further configured to:
updating the page information of the target page and the cross reference table according to the merged page object list;
and updating the addresses of the cross-reference tables declared in the file tails according to the updated cross-reference tables.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
The embodiments of the present disclosure also provide a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the aforementioned image merging method when executing the program. The method at least comprises the following steps:
an image merging method, the method comprising:
obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
writing the merging requirement information into an object list of the target page to obtain a merged page object list;
and analyzing the combined page object list, and rendering to generate a combined image in which the target image file is embedded into the background image file.
FIG. 7 illustrates a more specific hardware architecture diagram of a computing device provided by embodiments of the present description, which may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the aforementioned image merging method. The method at least comprises the following steps:
an image merging method, the method comprising:
obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
writing the merging requirement information into an object list of the target page to obtain a merged page object list;
and analyzing the combined page object list, and rendering to generate a combined image in which the target image file is embedded into the background image file.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
From the foregoing description of embodiments, it will be apparent to those skilled in the art that the present embodiments may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present specification.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The apparatus embodiments described above are merely illustrative, in which the modules illustrated as separate components may or may not be physically separate, and the functions of the modules may be implemented in the same piece or pieces of software and/or hardware when implementing the embodiments of the present disclosure. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is merely a specific implementation of the embodiments of this disclosure, and it should be noted that, for a person skilled in the art, several improvements and modifications may be made without departing from the principles of the embodiments of this disclosure, and these improvements and modifications should also be considered as protective scope of the embodiments of this disclosure.

Claims (13)

1. An image merging method, the method comprising:
obtaining an object list of a target page in a background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
obtaining merging requirement information of a target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
writing the merging requirement information into an object list of the target page to obtain a merged page object list;
updating the cross reference table of the page information and the background image file of the target page according to the combined page object list;
updating the address of the cross reference table declared in the file tail according to the updated cross reference table to obtain a merged PDF file;
and analyzing and rendering the combined PDF file to generate a combined image in which the target image file is embedded into the background image file.
2. The method of claim 1, the obtaining the object list of the target page in the background image file, comprising:
determining a target page to be embedded with a target image in a background image file;
analyzing the file tail of the background image file to obtain a cross-reference table of the background image file;
and obtaining an object list of the target page according to the addresses referenced in the cross-reference table.
3. The method of claim 2, the parsing the file tail of the background image file to obtain a cross-reference table of the background image file, comprising:
analyzing the file tail of the background image file, and determining the address of a cross reference table declared in the file tail according to a preset declaration character;
and obtaining the cross reference table of the background image file according to the address of the cross reference table.
4. A method according to claim 3, said obtaining an object list of said target page from addresses referenced in said cross-reference table, comprising:
analyzing the cross reference table to obtain the address of the referenced object recorded in the table;
analyzing the file tail of the background image file to obtain a reference identifier of a root directory;
obtaining the root directory according to the reference identification of the root directory and the address recorded in the cross reference table;
and obtaining an object list of the target page according to the page information recorded by the root directory.
5. The method according to claim 4, wherein the obtaining the object list of the target page according to the page information recorded in the root directory includes:
analyzing the root directory to obtain a reference identifier of the page directory;
obtaining the page directory according to the reference identification of the page directory and the address recorded in the cross reference table; the page directory includes: the number of pages in the background image file and the reference mark of each page;
and obtaining an object list of the target page according to the reference identification of the target page in the page directory.
6. The method according to claim 5, wherein the obtaining the object list of the target page according to the reference identifier of the target page in the page directory includes:
analyzing the page directory to obtain the reference identification of the target page;
acquiring page information of the target page according to the reference identification of the target page and the address recorded in the cross reference table;
and analyzing the obtained page information to obtain an object list of the target page.
7. An image merging apparatus, the apparatus comprising:
the list obtaining module is used for obtaining an object list of a target page in the background image file, wherein the object list comprises attribute information of each object in the page; the background image file is in a PDF format;
the demand acquisition module is used for acquiring the merging demand information of the target image file; the merging requirement information is used for representing: the target image file is embedded into attribute information in the background image file;
a list updating module, configured to write the merging requirement information into an object list of the target page to obtain a merged page object list, update, according to the merged page object list, page information of the target page and a cross reference table of a background image file, and update, according to the updated cross reference table, an address of a cross reference table declared in a file tail;
and the image generation module is used for analyzing and rendering the combined PDF file and generating a combined image in which the target image file is embedded into the background image file.
8. The apparatus of claim 7, the list obtaining module comprising:
the page determining submodule is used for determining a target page to be embedded with a target image in the background image file;
the file tail analysis sub-module is used for analyzing the file tail of the background image file and obtaining a cross-reference table of the background image file;
and the list obtaining sub-module is used for obtaining the object list of the target page according to the addresses referenced in the cross reference table.
9. The apparatus of claim 8, the tail parsing sub-module specifically configured to:
analyzing the file tail of the background image file, and determining the address of a cross reference table declared in the file tail according to a preset declaration character;
and obtaining the cross reference table of the background image file according to the address of the cross reference table.
10. The apparatus of claim 9, the list obtaining sub-module comprising:
a reference table analyzing unit for analyzing the cross reference table to obtain the address of the referenced object recorded in the table;
the file tail analyzing unit is used for analyzing the file tail of the background image file and obtaining the reference mark of the root directory;
a root directory obtaining unit, configured to obtain the root directory according to a reference identifier of the root directory and an address recorded in the cross reference table;
and the list obtaining unit is used for obtaining the object list of the target page according to the page information recorded by the root directory.
11. The apparatus of claim 10, the list obtaining unit comprising:
the root directory analyzing unit is used for analyzing the root directory and obtaining the reference identification of the page directory;
a page directory obtaining subunit, configured to obtain the page directory according to a reference identifier of the page directory and an address recorded in the cross reference table; the page directory includes: the number of pages in the background image file and the reference mark of each page;
and the list obtaining subunit is used for obtaining the object list of the target page according to the reference identification of the target page in the page directory.
12. The apparatus of claim 11, the list obtaining subunit being specifically configured to:
analyzing the page directory to obtain the reference identification of the target page;
acquiring page information of the target page according to the reference identification of the target page and the address recorded in the cross reference table;
and analyzing the obtained page information to obtain an object list of the target page.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when the program is executed by the processor.
CN201811429317.1A 2018-11-27 2018-11-27 Image merging method and device Active CN109948123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811429317.1A CN109948123B (en) 2018-11-27 2018-11-27 Image merging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811429317.1A CN109948123B (en) 2018-11-27 2018-11-27 Image merging method and device

Publications (2)

Publication Number Publication Date
CN109948123A CN109948123A (en) 2019-06-28
CN109948123B true CN109948123B (en) 2023-06-02

Family

ID=67005879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811429317.1A Active CN109948123B (en) 2018-11-27 2018-11-27 Image merging method and device

Country Status (1)

Country Link
CN (1) CN109948123B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113128175B (en) * 2021-04-19 2023-01-24 福建福昕软件开发股份有限公司 Method and system for merging large batch of PDF (portable document format) files

Citations (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842126A (en) * 2005-03-28 2006-10-04 兄弟工业株式会社 Information processing apparatus, image forming apparatus and method, and storage medium therefor
CN102375847A (en) * 2010-08-17 2012-03-14 富士通株式会社 Method and device for forming merge tree for generating document template
CN102387127A (en) * 2010-08-31 2012-03-21 腾讯科技(北京)有限公司 Method and system for saving drawing table data in Internet
CN102622562A (en) * 2012-02-27 2012-08-01 中山大学 PDF (Portable Document Format) file information embedding and extracting method based on PDF cross reference table
CN102646179A (en) * 2012-02-27 2012-08-22 中山大学 PDF (Portable Document Format) document information embedding and extraction method based on PDF documents
CN102769724A (en) * 2011-05-03 2012-11-07 Lg电子株式会社 Electronic device and method for operating the same
CN103166992A (en) * 2011-12-14 2013-06-19 中国电信股份有限公司 Method and system of fast file updating applied to cloud storage
CN103197908A (en) * 2013-04-09 2013-07-10 广东粤铁瀚阳科技有限公司 Information display platform based PDF (portable document format) file display method and information display platform based PDF file display system
CN103310150A (en) * 2012-03-13 2013-09-18 百度在线网络技术(北京)有限公司 Method and device for detecting portable document format (PDF) vulnerability
CN103390005A (en) * 2012-05-11 2013-11-13 北大方正集团有限公司 Method and system for merging documents
CN103544408A (en) * 2013-09-23 2014-01-29 中山大学 Method for embedment and extraction of PDF document hidden information according to composite font
CN103645974A (en) * 2013-12-31 2014-03-19 厦门市美亚柏科信息股份有限公司 Method and device for recovering portable document format (PDF) file
CN103714047A (en) * 2013-11-12 2014-04-09 知识产权出版社 Lateral proofreading and double-layer PDF file outputting method and device
CN104063492A (en) * 2014-07-04 2014-09-24 用友软件股份有限公司 Image synthesizing method and system
CN104239800A (en) * 2014-09-28 2014-12-24 北京奇虎科技有限公司 Detection method and device for bug trigger threat in PDF (Portable Document Format)
CN104572043A (en) * 2013-10-16 2015-04-29 阿里巴巴集团控股有限公司 Method and device for embedding points for controls of client application in real time
KR20150052540A (en) * 2013-11-06 2015-05-14 건국대학교 산학협력단 Method for transcoding mutimedia, and hadoop-based mulimedia transcoding system operating the same
CN104899822A (en) * 2015-06-17 2015-09-09 西南交通大学 Watermarking embedding and authentication method of positioning PDF electronic invoice falsification
CN105094930A (en) * 2015-09-09 2015-11-25 上海斐讯数据通信技术有限公司 Image positioning system and method
CN105373562A (en) * 2014-08-27 2016-03-02 北大方正集团有限公司 Acquisition method and device of PDF (Portable Document Format) documentation comment
CN105740267A (en) * 2014-12-10 2016-07-06 北大方正集团有限公司 PDF (Portable Document Format) file processing method and apparatus
CN105871542A (en) * 2016-03-25 2016-08-17 贵州大学 Encryption and decryption method of ciphertext
CN105868630A (en) * 2016-03-24 2016-08-17 中国科学院信息工程研究所 Malicious PDF document detection method
CN105975451A (en) * 2016-05-27 2016-09-28 成都优译信息技术有限公司 Processing system and method for DWG-format-file translation data
CN106096592A (en) * 2016-07-22 2016-11-09 浙江大学 A kind of printed page analysis method of digital book
CN106296785A (en) * 2016-08-09 2017-01-04 腾讯科技(深圳)有限公司 A kind of picture rendering intent and picture rendering apparatus
CN106407450A (en) * 2016-09-30 2017-02-15 网易(杭州)网络有限公司 File searching method and apparatus
CN106446863A (en) * 2016-10-11 2017-02-22 同方知网(北京)技术有限公司 PDF document logic diagram identification method
CN106445640A (en) * 2016-10-20 2017-02-22 南京南瑞继保电气有限公司 Running method for embedded type virtual device and system
CN106897690A (en) * 2017-02-22 2017-06-27 南京述酷信息技术有限公司 PDF table extracting methods
CN106936904A (en) * 2017-03-07 2017-07-07 济南浪潮高新科技投资发展有限公司 A kind of picture upload method and device
CN107037993A (en) * 2016-02-04 2017-08-11 株式会社理光 Image processing system and image formation system
CN107133566A (en) * 2017-03-31 2017-09-05 常诚 A kind of method of chart in identification PDF document
CN107292136A (en) * 2017-07-10 2017-10-24 广东省广业科技集团有限公司 A kind of pdf document anti-counterfei waterprint embedding grammar and system based on micro services
CN107885848A (en) * 2017-11-10 2018-04-06 杭州美创科技有限公司 Web page screen-cutting method based on web technology
CN107944273A (en) * 2017-12-14 2018-04-20 贵州航天计量测试技术研究所 A kind of malice PDF document detection method based on TF IDF algorithms and SVDD algorithms
CN107957985A (en) * 2016-10-18 2018-04-24 北京京东尚科信息技术有限公司 Format document display methods and device
CN108415887A (en) * 2018-02-09 2018-08-17 武汉大学 A kind of method that pdf document is converted to OFD files
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN108776651A (en) * 2018-06-08 2018-11-09 北京厚德思成科技有限公司 The annotation processing method and system of pdf document
CN108780439A (en) * 2016-03-08 2018-11-09 威兹瑞德有限责任公司 For system and method abundant in content and for instructing reading and realizing understanding

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441713B (en) * 2007-11-19 2010-12-08 汉王科技股份有限公司 Optical character recognition method and apparatus of PDF document
CN101216828B (en) * 2007-12-27 2012-01-11 北大方正集团有限公司 Image file conversion method and apparatus
US9171392B2 (en) * 2011-08-02 2015-10-27 Tracer Imaging Llc Lenticular product having a radial lenticular blending effect
TW201308979A (en) * 2011-08-10 2013-02-16 Chunghwa Picture Tubes Ltd Method for playing back three dimensional images
CN104462986B (en) * 2014-11-28 2019-02-01 北京奇虎科技有限公司 The detection method and device that loophole threatens are triggered in PDF
US11263004B2 (en) * 2016-10-21 2022-03-01 Citrix Systems, Inc. Out of band layer scrubbing
US10579358B2 (en) * 2016-11-10 2020-03-03 Cisco Technology, Inc. Space-optimized software installation using in-place extractable archive image
CN108153798B (en) * 2016-12-02 2022-02-18 阿里巴巴集团控股有限公司 Page information processing method, device and system
US10937214B2 (en) * 2017-03-22 2021-03-02 Google Llc System and method for merging maps

Patent Citations (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842126A (en) * 2005-03-28 2006-10-04 兄弟工业株式会社 Information processing apparatus, image forming apparatus and method, and storage medium therefor
CN102375847A (en) * 2010-08-17 2012-03-14 富士通株式会社 Method and device for forming merge tree for generating document template
CN102387127A (en) * 2010-08-31 2012-03-21 腾讯科技(北京)有限公司 Method and system for saving drawing table data in Internet
CN102769724A (en) * 2011-05-03 2012-11-07 Lg电子株式会社 Electronic device and method for operating the same
CN103166992A (en) * 2011-12-14 2013-06-19 中国电信股份有限公司 Method and system of fast file updating applied to cloud storage
CN102622562A (en) * 2012-02-27 2012-08-01 中山大学 PDF (Portable Document Format) file information embedding and extracting method based on PDF cross reference table
CN102646179A (en) * 2012-02-27 2012-08-22 中山大学 PDF (Portable Document Format) document information embedding and extraction method based on PDF documents
CN103310150A (en) * 2012-03-13 2013-09-18 百度在线网络技术(北京)有限公司 Method and device for detecting portable document format (PDF) vulnerability
CN103390005A (en) * 2012-05-11 2013-11-13 北大方正集团有限公司 Method and system for merging documents
CN103197908A (en) * 2013-04-09 2013-07-10 广东粤铁瀚阳科技有限公司 Information display platform based PDF (portable document format) file display method and information display platform based PDF file display system
CN103544408A (en) * 2013-09-23 2014-01-29 中山大学 Method for embedment and extraction of PDF document hidden information according to composite font
CN104572043A (en) * 2013-10-16 2015-04-29 阿里巴巴集团控股有限公司 Method and device for embedding points for controls of client application in real time
KR20150052540A (en) * 2013-11-06 2015-05-14 건국대학교 산학협력단 Method for transcoding mutimedia, and hadoop-based mulimedia transcoding system operating the same
CN103714047A (en) * 2013-11-12 2014-04-09 知识产权出版社 Lateral proofreading and double-layer PDF file outputting method and device
CN103645974A (en) * 2013-12-31 2014-03-19 厦门市美亚柏科信息股份有限公司 Method and device for recovering portable document format (PDF) file
CN104063492A (en) * 2014-07-04 2014-09-24 用友软件股份有限公司 Image synthesizing method and system
CN105373562A (en) * 2014-08-27 2016-03-02 北大方正集团有限公司 Acquisition method and device of PDF (Portable Document Format) documentation comment
CN104239800A (en) * 2014-09-28 2014-12-24 北京奇虎科技有限公司 Detection method and device for bug trigger threat in PDF (Portable Document Format)
CN105740267A (en) * 2014-12-10 2016-07-06 北大方正集团有限公司 PDF (Portable Document Format) file processing method and apparatus
CN104899822A (en) * 2015-06-17 2015-09-09 西南交通大学 Watermarking embedding and authentication method of positioning PDF electronic invoice falsification
CN105094930A (en) * 2015-09-09 2015-11-25 上海斐讯数据通信技术有限公司 Image positioning system and method
CN107037993A (en) * 2016-02-04 2017-08-11 株式会社理光 Image processing system and image formation system
CN108780439A (en) * 2016-03-08 2018-11-09 威兹瑞德有限责任公司 For system and method abundant in content and for instructing reading and realizing understanding
CN105868630A (en) * 2016-03-24 2016-08-17 中国科学院信息工程研究所 Malicious PDF document detection method
CN105871542A (en) * 2016-03-25 2016-08-17 贵州大学 Encryption and decryption method of ciphertext
CN105975451A (en) * 2016-05-27 2016-09-28 成都优译信息技术有限公司 Processing system and method for DWG-format-file translation data
CN106096592A (en) * 2016-07-22 2016-11-09 浙江大学 A kind of printed page analysis method of digital book
CN106296785A (en) * 2016-08-09 2017-01-04 腾讯科技(深圳)有限公司 A kind of picture rendering intent and picture rendering apparatus
CN106407450A (en) * 2016-09-30 2017-02-15 网易(杭州)网络有限公司 File searching method and apparatus
CN106446863A (en) * 2016-10-11 2017-02-22 同方知网(北京)技术有限公司 PDF document logic diagram identification method
CN107957985A (en) * 2016-10-18 2018-04-24 北京京东尚科信息技术有限公司 Format document display methods and device
CN106445640A (en) * 2016-10-20 2017-02-22 南京南瑞继保电气有限公司 Running method for embedded type virtual device and system
CN106897690A (en) * 2017-02-22 2017-06-27 南京述酷信息技术有限公司 PDF table extracting methods
CN106936904A (en) * 2017-03-07 2017-07-07 济南浪潮高新科技投资发展有限公司 A kind of picture upload method and device
CN107133566A (en) * 2017-03-31 2017-09-05 常诚 A kind of method of chart in identification PDF document
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN107292136A (en) * 2017-07-10 2017-10-24 广东省广业科技集团有限公司 A kind of pdf document anti-counterfei waterprint embedding grammar and system based on micro services
CN107885848A (en) * 2017-11-10 2018-04-06 杭州美创科技有限公司 Web page screen-cutting method based on web technology
CN107944273A (en) * 2017-12-14 2018-04-20 贵州航天计量测试技术研究所 A kind of malice PDF document detection method based on TF IDF algorithms and SVDD algorithms
CN108415887A (en) * 2018-02-09 2018-08-17 武汉大学 A kind of method that pdf document is converted to OFD files
CN108776651A (en) * 2018-06-08 2018-11-09 北京厚德思成科技有限公司 The annotation processing method and system of pdf document

Also Published As

Publication number Publication date
CN109948123A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
KR101955732B1 (en) Associating captured image data with a spreadsheet
CN109145238B (en) Card display method and device and mobile device
CN113609820B (en) Method, device and equipment for generating word file based on extensible markup language file
JP2011523133A (en) Layout file structure processing method and apparatus
CN106796525B (en) On-demand loading dynamic script language codes are to reduce memory use
CN106648569B (en) Target serialization realization method and device
CN109658485B (en) Webpage animation drawing method, device, computer equipment and storage medium
CN114118007A (en) Method for converting format data stream file into OFD file
CN111125008B (en) Dynamic repairing method and system of abnormal inode and related components
CN113296774A (en) OFD file processing method and system based on browser
CN109948123B (en) Image merging method and device
CN114638200A (en) Electronic book typesetting style code generation method, device, equipment and storage medium
JP2019522847A (en) Method, device and terminal device for extracting data
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN113297425B (en) Document conversion method, device, server and storage medium
CN111475156B (en) Page code generation method and device, electronic equipment and storage medium
CN113778820A (en) Application program data export method, device, electronic device and storage medium
JP2016532190A (en) Document format conversion apparatus and method
CN107608947B (en) HTML file processing method and device and electronic equipment
CN113343663A (en) Bill structuring method and device
CN115495469B (en) Method and device for updating chart file and electronic equipment
CN114003489B (en) Front-end code file detection method and device, electronic equipment and storage medium
CN117453548B (en) Code module information determining method, apparatus, computer device and storage medium
CN114489895B (en) Batch poster generation method, device, equipment and medium
CN113505572B (en) Method, device, equipment and medium for converting typesetting file into XML data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant