CN111399785B - Color processing method, device, equipment and system of PDF (Portable document Format) file - Google Patents

Color processing method, device, equipment and system of PDF (Portable document Format) file Download PDF

Info

Publication number
CN111399785B
CN111399785B CN201811611929.2A CN201811611929A CN111399785B CN 111399785 B CN111399785 B CN 111399785B CN 201811611929 A CN201811611929 A CN 201811611929A CN 111399785 B CN111399785 B CN 111399785B
Authority
CN
China
Prior art keywords
color space
color
pdf file
page
transparent
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
CN201811611929.2A
Other languages
Chinese (zh)
Other versions
CN111399785A (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.)
Beijing Founder Easiprint Co ltd
New Founder Holdings Development Co ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201811611929.2A priority Critical patent/CN111399785B/en
Publication of CN111399785A publication Critical patent/CN111399785A/en
Application granted granted Critical
Publication of CN111399785B publication Critical patent/CN111399785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The embodiment of the invention provides a color processing method, a device, equipment and a system of a PDF file, wherein the method comprises the following steps: acquiring a PDF file and analyzing the PDF file; judging whether the color spaces of the pages and the transparent groups in the PDF file are the color spaces of the equipment or not; if the color space of the page and/or the transparent group is not the device color space, converting the color space of the page and/or the transparent group into the device color space; and generating a modified PDF file according to the converted color space. Because the conversion of the color space is only carried out once for the page color space and the transparent group color space, namely, the page color space and the transparent group color space are converted into the equipment color space, the problem that the transparent group converts the color space into the page color space firstly when carrying out transparent calculation and converts the page color space into the repeated color space of the equipment color space when carrying out RIP processing is avoided, and therefore the color of the printed file can be effectively guaranteed to meet the original color, is not distorted and meets the original set requirement.

Description

Color processing method, device, equipment and system of PDF (Portable document Format) file
Technical Field
The embodiment of the invention relates to the technical field of printing, in particular to a method, a device, equipment and a system for processing colors of a PDF file.
Background
The PDF file comprises a page and a graphic element, if the page resource in the PDF file comprises a transparent attribute, the PDF file is a transparent file, and when the RIP processing is carried out before the PDF file is printed, the transparent calculation of a transparent group consisting of a plurality of transparent graphic elements is required. When performing the transparency calculation, it is necessary to unify the color spaces of the page and the transparency group, for example, the page color space is RGB, and the color space of the primitive in the transparency group may be CMYK, RGB, GRAY, LAB, or the like, and when performing the transparency calculation, the color spaces of the various primitives are uniformly converted into RGB color spaces for performing the transparency calculation.
However, for a transparent file, if the color space of the transparent group primitive is an N-channel color space and the page color space is an M-channel color, such as an RGB color space, during RIP processing, the transparent group color space is first converted into an M-channel color space. When the device needs to output the N-channel color space, the color space of the page and the transparent set is converted into the N-channel color space, taking the N-channel color space as the CMYK color space and the M-channel color space as the RGB color space as an example, the color space of the transparent set needs to be converted from the CMYK color space into the RGB color space and then into the CMYK color space, and the transparent set finally causes the color distortion of the printed file after the color space conversion of different channel numbers is repeated, and the color of the printed file cannot meet the originally set requirements.
Disclosure of Invention
The embodiment of the invention provides a color processing method, a device, equipment and a system of a PDF (Portable document Format) file, which solve the technical problems that in the prior art, the color of a printed file is distorted and cannot meet the originally set requirement.
In a first aspect, an embodiment of the present invention provides a method for processing a color of a PDF file, including:
acquiring a PDF file and analyzing the PDF file;
judging whether the color spaces of the pages and the transparent groups in the PDF file are the color spaces of the equipment or not;
if the color space of the page and/or the transparent group is not the equipment color space, converting the color space of the page and/or the transparent group into the equipment color space;
and generating a modified PDF file according to the converted color space.
Further, the method, as described above, converting the color space of the page and/or the transparent group into the device color space if the color space of the page and/or the transparent group is not the device color space, specifically includes:
if the color space of the page and/or the transparent group is not the equipment color space, judging whether the color space conversion decision information input by the user through the interface is the decision information for color space conversion;
and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into an equipment color space.
Further, the method as described above, if converting the color space of the transparent set into the device color space, further includes:
converting the color space of the non-black primitives in the transparent group to a device color space;
and keeping the color space of the black graphic elements in the transparent group as the original color space.
Further, the method as described above, after maintaining the color space of the black primitive in the transparent group as the original color space, further includes:
generating an operator corresponding to the black graphic element in the transparent group;
displaying the color attribute related information of the black graphic element according to the operator;
wherein the color attribute related information of the black primitive at least comprises:
the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
Further, the method as described above, after generating the modified PDF file according to the converted color space, further comprising:
converting the modified PDF file into an XML format file;
and outputting the XML format file.
In a second aspect, an embodiment of the present invention provides a color processing apparatus for a PDF file, including:
the PDF file acquisition module is used for acquiring a PDF file and analyzing the PDF file;
the color space judging module is used for judging whether the color spaces of the pages and the transparent groups in the PDF file are the device color spaces;
the color space conversion module is used for converting the color space of the page and/or the transparent group into the color space of the equipment if the color space of the page and/or the transparent group is not the color space of the equipment;
and the modified PDF file generating module is used for generating a modified PDF file according to the converted color space.
Further, in the apparatus as described above, the color space determining module is specifically configured to:
if the color space of the page and/or the transparent group is not the equipment color space, judging whether the color space conversion decision information input by the user through the interface is the decision information for color space conversion; and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into an equipment color space.
Further, the apparatus as described above, if the color space converting module converts the color space of the transparent set into the device color space, further includes: a primitive color space conversion module;
the primitive color space conversion module is used for converting the color space of the non-black primitive in the transparent group into an equipment color space; and keeping the color space of the black graphic elements in the transparent group as the original color space.
Further, the apparatus as described above, further comprising:
the operator generating module is used for generating an operator corresponding to the black graphic primitive in the transparent group;
the color attribute display module is used for displaying the color attribute related information of the black graphic element according to the operator;
wherein the color attribute related information of the black primitive at least comprises:
the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
Further, the apparatus as described above, further comprising:
the file format conversion module is used for converting the modified PDF file into an XML format file;
and the XML file output module is used for outputting the XML format file.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method according to any one of the first aspect.
The embodiment of the invention provides a method, a device, equipment and a system for processing colors of a PDF (Portable document Format) file, which are used for acquiring the PDF file and analyzing the PDF file; judging whether the color spaces of the pages and the transparent groups in the PDF file are the color spaces of the equipment or not; if the color space of the page and/or the transparent group is not the device color space, converting the color space of the page and/or the transparent group into the device color space; and generating a modified PDF file according to the converted color space. Because the conversion of the color space is only carried out once for the page color space and the transparent group color space, namely, the page color space and the transparent group color space are converted into the equipment color space, the problem that the transparent group converts the color space into the page color space firstly when carrying out transparent calculation and converts the page color space into the repeated color space of the equipment color space when carrying out RIP processing is avoided, and therefore the color of the printed file can be effectively guaranteed to meet the original color, is not distorted and meets the original set requirement.
It should be understood that what is described in the summary above is not intended to limit key or critical features of embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a color processing method of a PDF file according to an embodiment of the present invention;
fig. 2 is a flowchart of a color processing method of a PDF file according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a color processing apparatus for a PDF file according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a color processing apparatus for a PDF file according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiments of the present invention will be described with reference to the accompanying drawings.
Example one
Fig. 1 is a flowchart of a color processing method of a PDF file according to an embodiment of the present invention, and as shown in fig. 1, an execution main body of the color processing method of a PDF file according to the present embodiment is a color processing apparatus of a PDF file, the color processing apparatus of a PDF file may be integrated into an electronic device, and the electronic device may be a computer, a notebook computer, or other devices with independent computing and processing capabilities, and then the color processing method of a PDF file according to the present embodiment includes the following steps.
Step 101, obtaining a PDF file and analyzing the PDF file.
The PDF file is a file with a portable file format, is a file with an electronic file format, and comprises pages and graphic elements. And if the plurality of transparent primitives are overlapped, forming a transparent group by the plurality of transparent primitives, wherein the PDF file comprising the transparent primitives is a transparent file.
Specifically, in this embodiment, a PDF file is obtained, a page resource of the PDF file is scanned, whether the page resource includes a transparent attribute is determined, and if the page resource includes the transparent attribute, the transparent attribute of the page and the transparent attribute of the transparent group are obtained. A color space is included in the transparency property.
Step 102, judging whether the color space of the page and the transparent group in the PDF file is the equipment color space.
Specifically, the transparency attribute of the page is acquired, and it is checked whether or not the color space of the transparency attribute is a device color space, where the device color space is simply referred to as CMYK color space. And acquiring the transparent attribute of the transparent group, and checking whether the color space of the transparent attribute of the transparent group is the equipment color space.
The transparent group is formed by superposing a plurality of primitives.
And 103, if the color space of the page and/or the transparent group is not the device color space, converting the color space of the page and/or the transparent group into the device color space.
Specifically, in the present embodiment, if only the color space of the page is not the CMYK color space, only the color space of the page is converted into the CMYK color space. If only the color space of the transparent set is not the CMYK color space, only the color space of the transparent set is converted into the CMYK color space. If the color spaces of both the page and the transparent set are not the CMYK color spaces, the color spaces of both the page and the transparent set are converted into CMYK color spaces.
The color space of the original page may be an RGB color space or other color spaces. The color space of the transparent set may be any one of a CMYK color space, an RGB color space, a GRAY color space, and an LAB color space.
In this embodiment, after the color space of the page and/or the transparent group is converted into the device color space, the device color space is marked, identification information is allocated to the color space of the converted page and/or the transparent group, and the allocated identification information is recorded.
It can be understood that, after converting the color space of the page and/or the transparent group into the device color space, the color spaces of the page and the transparent group are both the device color space, so that the transparent calculation can be performed, and after completing the transparent calculation, the RIP process can be completed without performing the conversion of the color space.
And 104, generating a modified PDF file according to the converted color space.
Specifically, in this embodiment, the converted color space is obtained according to the identification information of the converted color space, and the modified PDF file is generated according to the converted color space.
It can be understood that, after converting the color space of the page and/or the transparent group into the device color space, if the content stream corresponding to the PDF file is changed, the changed content stream is recorded, and the modified content stream object is set to the current page object of the PDF file to form a part of the modified PDF file.
In the color processing method of the PDF file provided by this embodiment, the PDF file is obtained and analyzed; judging whether the color spaces of the pages and the transparent groups in the PDF file are the color spaces of the equipment or not; if the color space of the page and/or the transparent group is not the device color space, converting the color space of the page and/or the transparent group into the device color space; and generating a modified PDF file according to the converted color space. Because the conversion of the color space is only carried out once for the page color space and the transparent group color space, namely, the page color space and the transparent group color space are converted into the equipment color space, the problem that the transparent group converts the color space into the page color space firstly when carrying out transparent calculation and converts the page color space into the repeated color space of the equipment color space when carrying out RIP processing is avoided, and therefore the color of the printed file can be effectively guaranteed to meet the original color, is not distorted and meets the original set requirement.
Example two
Fig. 2 is a flowchart of a color processing method of a PDF file according to a second embodiment of the present invention, and as shown in fig. 2, the color processing method of a PDF file according to the present embodiment is further detailed in steps 103 to 104 on the basis of the color processing method of a PDF file according to the first embodiment of the present invention, and further includes converting a modified PDF file into an XML format file; in the step of outputting the XML format file, the color processing method of the PDF file provided in this embodiment includes the following steps.
Step 201, obtaining a PDF file, and analyzing the PDF file.
In this embodiment, the implementation manner of step 201 is the same as that of step 101 in the first embodiment of the present invention, and is not described in detail here.
Step 202, judging whether the color space of the page and the transparent group in the PDF file is the device color space, if so, ending, otherwise, executing step 203.
Step 203, determining whether the color space conversion decision information input by the user through the interface is the decision information for performing the color space conversion, if so, executing step 204, otherwise, ending.
Further, in this embodiment, the electronic device may provide an interface to the user through the interface whether to perform color conversion. And if the user selects the option for color conversion through the interface and confirms the option, the color processing device of the PDF file receives the input color space conversion decision information, namely the decision information for color space conversion. And if the user selects the option of not performing color conversion through the interface and confirms the option, the color processing device of the PDF file receives the input color space conversion decision information which is the decision information of not performing color space conversion.
Step 204, converting the color space of the page and/or the transparent group into a device color space.
Further, in this embodiment, if the color space conversion decision information is decision information for performing color space conversion, the color space of the page and/or the transparent group is converted into the device color space.
In the color processing method of the PDF file provided in this embodiment, if the color space of the page and/or the transparent group is not the device color space, when the color space of the page and/or the transparent group is converted into the device color space, it is determined whether color space conversion decision information input by a user through an interface is decision information for performing color space conversion; and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into the equipment color space. Whether color space conversion is carried out or not can be selected according to the requirements of a user on the printing colors of the PDF file, the freedom of printing the PDF files with different color requirements is improved, and the user experience of printing the PDF files with different color requirements is improved.
Step 205, if the color space of the transparent group is converted into the device color space, converting the color space of the non-black primitive in the transparent group into the device color space; and keeping the color space of the black graphic elements in the transparent group as the original color space.
Further, in this embodiment, the transparent group includes a plurality of superimposed primitives, and colors of the plurality of primitives may be different. If the original color space of the transparent group is not the device color space, the color space of the transparent group is converted into the device color space, then the color space of the non-black primitive is obtained, and the color space of the non-black primitive is converted into the device color space. While the color space of the black primitives in the transparent set is preserved. After the color space of the black primitive of the transparent group is reserved, the black primitive which is originally single black cannot be processed into the black primitive which is complex black after the RIP processing is carried out on the PDF file, and the black primitive which is originally complex black cannot be processed into the black primitive which is single black.
Wherein if the color space of the black primitive is the GRAY color space, the ink amount is 0%; if the color space is an RGB color space, the ink amount of each color is that R is G and B is 0 percent; if the color space is a CMYK color space, the amount of each color ink is C ═ M ═ Y ═ K ═ 100%, or C ═ M ═ Y ═ 0%, and K ═ 100%.
In the color processing method of the PDF file provided in this embodiment, if the color space of the transparent group is converted into the device color space, the color space of the non-black primitive in the transparent group is converted into the device color space; the color space of the black primitive in the transparent group is kept as the original color space, the black primitive which is originally single black cannot be processed into the black primitive which is single black after the PDF file is processed by RIP, the black primitive which is originally double black cannot be processed into the black primitive which is single black, the black primitive which is sensitive to the change of the channel number can meet the original color setting requirement, and the color effect of the PDF file is further improved.
It is understood that after the color space of the page and/or the transparent group is converted, the marking is performed, and the identification information is allocated to the color space of the converted page and/or the transparent group, and the allocated identification information is recorded in the resource dictionary. And the color space of the non-black primitive in the transparent group is converted into the equipment color space and then marked, identification information is distributed to the color space of the non-black primitive, and the distributed identification information is recorded.
Further, in this embodiment, after completing the color space conversion of the page and/or the transparent group and the non-black primitive, according to the mark and the recorded identification information, it is determined whether the content stream needs to be modified, if the content stream needs to be modified, the content stream is modified, the modified content stream is recorded, and the modified content stream is set in the page object of the PDF file.
And step 206, generating an operator corresponding to the black primitive in the transparent group, and displaying the color attribute related information of the black primitive according to the operator.
Wherein, the color attribute related information of the black primitive at least comprises:
the color space type of the black primitive, the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
Further, in this embodiment, a pair of operators corresponding to the black primitive in the transparent group is generated, where the pair of operators includes a BDC operator and an EMC operator, where the BDC operator is a start operator and the EMC operator is an end operator, and a dictionary may be newly constructed by adding some settings of color attribute related information for operating on the current black primitive through the BDC operator, where the color attribute related information at least includes: and displaying the color attribute related information of the black primitive to a user by calling the BDC operator, wherein the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is judged. After the black graphic element is processed, the EMC operator is used for finishing the marking of the current black graphic element, and the processing of the next graphic element is not influenced.
Step 207, generating a modified PDF file according to the converted color space.
In this embodiment, the implementation manner of step 207 is the same as the implementation manner of step 104 in the first embodiment of the present invention, and details are not repeated here.
And 208, converting the modified PDF file into an XML format file, and outputting the XML format file.
Further, in this embodiment, the format of the modified PDF file is converted into an XML-format file, and a specific conversion method is not limited in this embodiment. And outputting the XML format file for the user to check.
In the color processing method of the PDF file provided by this embodiment, the modified PDF file is converted into an XML format file; and outputting an XML format file, wherein the page and/or the transparent group, the color space after the non-black primitive conversion and the color space kept by the black primitive can be more visually checked in the XML format file.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a color processing apparatus for a PDF file according to an embodiment of the present invention, and as shown in fig. 3, the color processing apparatus for a PDF file according to the present embodiment includes: a PDF file obtaining module 31, a color space judging module 32, a color space converting module 33 and a modified PDF file generating module 34.
The PDF file obtaining module 31 is configured to obtain a PDF file, and analyze the PDF file. And the color space judging module 32 is configured to judge whether the color space of the page and the transparent group in the PDF file is the device color space. And a color space converting module 33, configured to convert the color space of the page and/or the transparent group into the device color space if the color space of the page and/or the transparent group is not the device color space. And a modified PDF file generating module 34, configured to generate a modified PDF file according to the converted color space.
The color processing apparatus for PDF files provided in this embodiment may execute the technical solution of the method embodiment shown in fig. 1, and the implementation principle and technical effect thereof are similar, and are not described herein again.
Fig. 4 is a schematic structural diagram of a color processing apparatus for a PDF file according to a second embodiment of the present invention, and as shown in fig. 4, the color processing apparatus for a PDF file according to the present embodiment is based on the color processing apparatus for a PDF file according to a third embodiment of the present invention, and further includes: a primitive color space conversion module 41, an operator generation module 42, a color attribute presentation module 43, a file format conversion module 44, and an XML file output module 45.
Further, the color space determining module 32 is specifically configured to:
if the color space of the page and/or the transparent group is not the equipment color space, judging whether the color space conversion decision information input by the user through the interface is the decision information for color space conversion; and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into the equipment color space.
Further, if the color space conversion module converts the color space of the transparent group into the device color space, the primitive color space conversion module 41 is configured to convert the color space of the non-black primitive in the transparent group into the device color space; and keeping the color space of the black graphic elements in the transparent group as the original color space.
Further, an operator generating module 42 is configured to generate an operator corresponding to the black primitive in the transparent group. And a color attribute exhibiting module 43, configured to exhibit the color attribute related information of the black primitive according to the operator.
Wherein, the color attribute related information of the black primitive at least comprises:
the color space type of the black primitive, the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
Further, the file format conversion module 44 is configured to convert the modified PDF file into an XML format file. And an XML file output module 45, configured to output an XML format file.
The color processing apparatus for PDF files provided in this embodiment may execute the technical solution of the method embodiment shown in fig. 2, and the implementation principle and technical effect thereof are similar, and are not described herein again.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, and as shown in fig. 5, the electronic device according to the present embodiment includes: a memory 51, a processor 52 and a computer program.
The computer program is stored in the memory 51 and configured to be executed by the processor 52 to implement the color processing method of the PDF file provided in the first embodiment of the present invention or the color processing method of the PDF file provided in the second embodiment of the present invention.
The relevant description may be understood by referring to the relevant description and effect corresponding to the steps in fig. 1 to fig. 2, and redundant description is not repeated here.
EXAMPLE six
A sixth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the color processing method for a PDF file provided in the first embodiment of the present invention or the color processing method for a PDF file provided in the second embodiment of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
Program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A color processing method of a PDF file is characterized by comprising the following steps:
acquiring a PDF file and analyzing the PDF file;
judging whether the color spaces of the pages and the transparent groups in the PDF file are the color spaces of the equipment or not;
if the color space of the page and/or the transparent group is not the equipment color space, converting the color space of the page and/or the transparent group into the equipment color space;
generating a modified PDF file according to the converted color space;
if the color space of the transparent group is converted into the device color space, the method further includes:
converting the color space of the non-black primitives in the transparent group to a device color space;
and keeping the color space of the black graphic elements in the transparent group as the original color space.
2. The method according to claim 1, wherein if the color space of the page and/or the transparent group is not a device color space, converting the color space of the page and/or the transparent group into the device color space specifically comprises:
if the color space of the page and/or the transparent group is not the equipment color space, judging whether the color space conversion decision information input by the user through the interface is the decision information for color space conversion;
and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into an equipment color space.
3. The method of claim 1, wherein after maintaining the color space of the black primitives in the transparent group as the original color space, further comprising:
generating an operator corresponding to the black graphic element in the transparent group;
displaying the color attribute related information of the black graphic element according to the operator;
wherein the color attribute related information of the black primitive at least comprises:
the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
4. The method according to any of claims 1-3, wherein after generating the modified PDF file according to the converted color space, further comprising:
converting the modified PDF file into an XML format file;
and outputting the XML format file.
5. A color processing apparatus of a PDF file, comprising:
the PDF file acquisition module is used for acquiring a PDF file and analyzing the PDF file;
the color space judging module is used for judging whether the color spaces of the pages and the transparent groups in the PDF file are the device color spaces;
the color space conversion module is used for converting the color space of the page and/or the transparent group into the color space of the equipment if the color space of the page and/or the transparent group is not the color space of the equipment;
a modified PDF file generation module for generating a modified PDF file according to the converted color space;
if the color space conversion module converts the color space of the transparent group into the device color space, the method further includes: a primitive color space conversion module;
the primitive color space conversion module is used for converting the color space of the non-black primitive in the transparent group into an equipment color space; and keeping the color space of the black graphic elements in the transparent group as the original color space.
6. The apparatus of claim 5, wherein the color space determining module is specifically configured to:
if the color space of the page and/or the transparent group is not the equipment color space, judging whether the color space conversion decision information input by the user through the interface is the decision information for color space conversion; and if the color space conversion decision information is decision information for color space conversion, converting the color space of the page and/or the transparent group into an equipment color space.
7. The apparatus of claim 5, further comprising:
the operator generating module is used for generating an operator corresponding to the black graphic primitive in the transparent group;
the color attribute display module is used for displaying the color attribute related information of the black graphic element according to the operator;
wherein the color attribute related information of the black primitive at least comprises:
the black primitive belongs to a single black primitive or a composite black primitive, and whether the black primitive is subjected to color space conversion or not is determined.
8. The apparatus of any one of claims 5-7, further comprising:
the file format conversion module is used for converting the modified PDF file into an XML format file;
and the XML file output module is used for outputting the XML format file.
9. An electronic device, comprising:
a memory, a processor, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-4.
10. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the method of any one of claims 1-4.
CN201811611929.2A 2018-12-27 2018-12-27 Color processing method, device, equipment and system of PDF (Portable document Format) file Active CN111399785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811611929.2A CN111399785B (en) 2018-12-27 2018-12-27 Color processing method, device, equipment and system of PDF (Portable document Format) file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811611929.2A CN111399785B (en) 2018-12-27 2018-12-27 Color processing method, device, equipment and system of PDF (Portable document Format) file

Publications (2)

Publication Number Publication Date
CN111399785A CN111399785A (en) 2020-07-10
CN111399785B true CN111399785B (en) 2021-08-27

Family

ID=71430122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811611929.2A Active CN111399785B (en) 2018-12-27 2018-12-27 Color processing method, device, equipment and system of PDF (Portable document Format) file

Country Status (1)

Country Link
CN (1) CN111399785B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012231243A (en) * 2011-04-25 2012-11-22 Fuji Xerox Co Ltd Image forming system, image formation control device, and image formation control program
CN104112255A (en) * 2014-06-19 2014-10-22 中国科学院深圳先进技术研究院 Rain removing method and system for single image
CN107924591A (en) * 2015-08-20 2018-04-17 株式会社理光 Information processor, image forming apparatus, the method and computer readable recording medium storing program for performing for manufacturing object output
JP2018074316A (en) * 2016-10-27 2018-05-10 理想科学工業株式会社 Image formation apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19946585A1 (en) * 1999-09-29 2001-04-12 Heidelberger Druckmasch Ag Process for adapting the printing process while maintaining the black structure
JP2007208531A (en) * 2006-01-31 2007-08-16 Canon Inc Multicolor printing apparatus and method of controlling same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012231243A (en) * 2011-04-25 2012-11-22 Fuji Xerox Co Ltd Image forming system, image formation control device, and image formation control program
CN104112255A (en) * 2014-06-19 2014-10-22 中国科学院深圳先进技术研究院 Rain removing method and system for single image
CN107924591A (en) * 2015-08-20 2018-04-17 株式会社理光 Information processor, image forming apparatus, the method and computer readable recording medium storing program for performing for manufacturing object output
JP2018074316A (en) * 2016-10-27 2018-05-10 理想科学工業株式会社 Image formation apparatus

Also Published As

Publication number Publication date
CN111399785A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US8015239B2 (en) Method and system to reduce false positives within an automated software-testing environment
US20120011429A1 (en) Image processing apparatus and image processing method
US11003680B2 (en) Method for providing e-book service and computer program therefor
US20160092407A1 (en) Document processing using multiple processing threads
CN107301046B (en) Icon processing method and device, computer equipment and storage medium
CN104572072A (en) MVC (model view controller) mode-based language transformation method and equipment for program
CN107451112B (en) Form tool data checking method, device, terminal equipment and storage medium
CN111427573B (en) Pattern generation method, computing device and storage medium
KR20070003418A (en) Method for providing mobile webpage by employing to dynamic template
US8774501B2 (en) Image processing apparatus, image processing method, image processing program storage medium
CN111208998A (en) Method and device for automatically laying out data visualization large screen and storage medium
JP4804443B2 (en) Judgment image printing source data generation device
CN110348527A (en) A kind of method for amalgamation processing of picture, device, equipment and storage medium
CN111399785B (en) Color processing method, device, equipment and system of PDF (Portable document Format) file
CN111142871A (en) Front-end page development system, method, equipment and medium
CN107908455B (en) Browser page switching method and system
US9390689B2 (en) Need-below processing across z-band boundaries
CN115620039A (en) Image labeling method, device, equipment, medium and program product
CN112487771B (en) Report generation method, report generation device and terminal
KR102418541B1 (en) Wire bundle production method, and apparatus therefor
CN104423964A (en) Method and system used for determining visualization credibility
US20200302661A1 (en) Information processing apparatus, computer-readable recording medium, and drawing creation support method
CN109344836B (en) Character recognition method and equipment
CN111046096A (en) Method and device for generating image-text structured information
US20200125628A1 (en) Simplified formatting for variable data production with vertical resolution of dependencies

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230613

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240516

Address after: 3007, Hengqin International Financial Center Building, No. 58 Huajin Street, Hengqin New District, Zhuhai City, Guangdong Province, 519030

Patentee after: New founder holdings development Co.,Ltd.

Country or region after: China

Patentee after: BEIJING FOUNDER EASIPRINT CO.,LTD.

Address before: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee before: New founder holdings development Co.,Ltd.

Country or region before: China

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.