Invention content
The present invention provides a kind of simply based on PDF grades of local linked network treatment technology, the extension that can be used setting special
Network parameters, so as to reach better printing effect.
According to an aspect of the invention, there is provided it is a kind of based on PDF grades of local linked network processing method, including:To lead
The local linked network parameter of pel addition in the pdf document entered, generates new pdf document;Institute is read based on the new pdf document
Local linked network parameter is stated, rasterization process is carried out using the local linked network parameter.
Wherein, the local linked network parameter of pel addition in the pdf document for importing specifically includes:Parse the importing
Pdf document, obtain the cross reference table (Cros-Reference Table) that document track body (FilerTrailer) includes,
Object table is created according to the cross reference table;The local linked network parameter is write to the Graphic State for describing specified object
Dictionary in, to build new Graphic State;Modification is for representing the content stream of drafting pdf document step, in the content stream
Middle addition Graphic State corresponding with the part linked network parameter;Resource registering, generation are carried out to increased local linked network parameter
The new object record simultaneously in the Object table and is updated the Object table and by modified content by new object
In stream deposit temporary file;New document track body and the new pdf document are generated according to newer Object table.
In last output, exported according to whether tagged object is changed.If changed, temporary file is found
Output.If do not changed, the object read in original is exported.
In the above-mentioned technical solutions, it is preferred that can also include:When parsing the pel of pdf document of the importing, know
Figure and image are not gone out;Corresponding local linked network parameter is set for the figure, for described image, according to described image
Plain net area determines whether to add local linked network parameter;It is determined to need the finger that local linked network parameter is written according to judging result
Determine object.
In the above-mentioned technical solutions, it is preferred that can also include:Local linked network mark is added in the new pdf document
Know;When carrying out rasterization process, identify in the new pdf document whether carry the office according to the local linked network mark
Portion's linked network parameter;When determining with the local linked network parameter, rasterization process is carried out using the local linked network parameter.
In the above-mentioned technical solutions, it is preferred that the local linked network parameter of pel in the pdf document for importing addition it
Before, it further includes:The resource in the pdf document imported is scanned, is judged whether comprising transparent pel;Only to not including transparent pel
The local linked network parameter of pdf document addition.
According to another aspect of the present invention, additionally provide it is a kind of based on PDF grades of local linked network processing unit, including:It hangs
Network parameters setting unit for adding local linked network parameter for the pel in the pdf document imported, generates new pdf document;Light
Gated unit for reading the local linked network parameter based on the new pdf document, is carried out using the local linked network parameter
Rasterization process.
Wherein, the linked network parameter set unit includes:Resolution unit for parsing the pdf document of the importing, obtains
The cross reference table (Cros-Reference Table) that document track body (FilerTrailer) includes draws according to the intersection
Object table is created with table;Construction unit, for the local linked network parameter to be write to the Graphic State for describing specified object
Dictionary in, to build new Graphic State;Unit is changed, for changing the content stream for representing to draw pdf document step,
The addition Graphic State corresponding with the part linked network parameter in the content stream;Updating unit, for increased part
Linked network parameter carries out resource registering, generates new object and by the new object record in the Object table and described in update
Object table and will modified content stream be stored in temporary file in;Generation unit is new for being generated according to newer Object table
Document track body and the new pdf document.
In the above-mentioned technical solutions, it is preferred that can also include:First recognition unit, in the PDF texts for parsing the importing
During the pel of part, figure and image are identified;First judging unit sets corresponding local linked network parameter for the figure,
For described image, determined whether to add local linked network parameter according to the plain net area of described image, be determined according to judging result
Need to be written the specified object of local linked network parameter.
In the above-mentioned technical solutions, it is preferred that can also include:Unit is identified, for adding in the new pdf document
Local linked network is added to identify;Second recognition unit is described new according to the local linked network mark identification when carrying out rasterization process
Pdf document in whether with the local linked network, when determining with the local linked network parameter, use the local linked network
Parameter carries out rasterization process.
In the above-mentioned technical solutions, it is preferred that can also include:Second judgment unit, for scanning the pdf document imported
In resource, judge whether comprising transparent pel, pdf document of the linked network parameter set unit only to not including transparent pel
The local linked network parameter of addition.
Automatic identification large area plain net pel according to the technique and scheme of the present invention sets local linked network parameter, is explained in RIP
When using the linked network parameter for setting special linked network parameter rather than RIP system defines or pel carries, so as to reach better print
Brushing effects.Simultaneously for objects different in PDF, there can be different linked network effects, realize the diversification of linked network.
Specific embodiment
It is to better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real
Mode is applied the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application
Feature in example and embodiment can be combined with each other.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also
To be implemented using other different from other modes described here, therefore, the present invention is not limited to following public specific realities
Apply the limitation of example.
Fig. 1 shows the signal stream according to an embodiment of the invention based on PDF grades of local linked network processing method
Cheng Tu.
As shown in Figure 1, it is according to an embodiment of the invention can be included based on PDF grades of local linked network processing method it is following
Step:Step 102, it is the local linked network parameter of pel addition in the pdf document of importing, generates new pdf document;Step 104,
Local linked network parameter is read based on new pdf document, rasterization process is carried out using local linked network parameter.
Wherein, the local linked network parameter of pel addition in the pdf document for importing specifically includes:Parse the importing
Pdf document, obtain the cross reference table that document track body includes, according to the cross reference table create Object table;By described in
Local linked network parameter is write in the dictionary for describing the Graphic State of specified object, to build new Graphic State;Modification is used
In the content stream for representing drafting pdf document step, the addition figure corresponding with the part linked network parameter in the content stream
State;Resource registering is carried out to increased local linked network parameter, generates new object and by the new object record described
In Object table and update the Object table and modified content stream is stored in temporary file;According to newer Object table
Generate new document track body and the new pdf document.Cross reference table can obtain according to document track body.
In the above-mentioned technical solutions, it is preferred that can also include:When parsing the pel of pdf document of the importing, know
Figure and image are not gone out;Corresponding local linked network parameter is set for the figure, for described image, according to described image
Plain net area determines whether to add local linked network parameter;It is determined to need the finger that local linked network parameter is written according to judging result
Determine object.
In the above-mentioned technical solutions, it is preferred that can also include:Local linked network mark is added in the new pdf document
Know;When carrying out rasterization process, identify in the new pdf document whether carry the office according to the local linked network mark
Portion's linked network parameter;When determining with the local linked network parameter, rasterization process is carried out using the local linked network parameter.
In the above-mentioned technical solutions, it is preferred that the local linked network parameter of pel in the pdf document for importing addition it
Before, it further includes:The resource in the pdf document imported is scanned, is judged whether comprising transparent pel;Only to not including transparent pel
The local linked network parameter of pdf document addition.
Fig. 2 shows the signal streams based on PDF grades of local linked network processing method according to another embodiment of the present invention
Cheng Tu.
The image of figure in the nontransparent PDF of present invention identification, gradual change, word and large area plain net, writes to such pel
Enter local linked network parameter, each object there can be the image state of oneself in such PDF, and implementation step is as follows:
Step 202, the resource in the page is scanned.
Step 204, if there is transparent elements, then without local linked network, 208 are entered step, alerts and terminates, otherwise into
Enter step 206.In the linked network of automatic identification part, transparent pel should be most intractable.Due to RIP (grating-based processor)
Processing transparent page substantially first generates 8-bit dot matrix, then, goes to carry out linked network again for 8-bit figures.And at this point,
Without the concept of specific single pel, so the local linked network based on pel also with regard to losing its practical significance naturally.
So for transparent pel, the current stage perhaps can not realize object-based local linked network.
Step 206, scan in page resource whether have local linked network mark.If there is this mark, then it represents that the PDF is
Local linked network was done, does not need to reprocess.If without this mark, 210 are entered step, adds local linked network parameter.
Step 210, start to parse PDF, read the File Trailer of PDF descriptions, obtain in Cross-Referenece
Share how many a entrance items.And Cross-Reference is read, PDF object entrance list items are established, are then existed according to each object
Offset in original, establishes Object table, and a newly-built temporary file for store all non-content streams and subpage frame but
The content description or new content description being modified, which is used for safeguarding the object of modification and its newly-increased object, is new PDF
The foundation of generation.
4th step according to PDF page description language rule, constructs HT dictionaries and structure color face grade Deafault HT dictionaries,
And construct a new Graphic State XS_GS0 step by step, the Graphic State only comprising local linked network parameter, reconstruct one it is new
Graphic State XS_GS1, the Graphic State is in order to restore the linked network parameter of current pel.Since the linked network parameter to pel is point
Color face, so needing to construct two Halftone dictionaries:One be object level HT dictionaries, one be color face grade
DefaultHT dictionaries.Upright own linked network parameter is identified in the dictionary.According to page description language handbook, one is constructed step by step
A image state (GS) dictionary with this linked network parameter.
In the process, it by newly-built object and the object of modification, notes down in Object table, and new content record
In corresponding temporary file, while update the offset in original and the offset in temporary file.
Step 212, in pel in parsing PDF, automatic identification figure and image, figure acquiescence carry out local linked network and set
It puts, then image determines the need for adding local linked network parameter, if it is desired, then enter according to whether be large area plain net
Step 214,216 are otherwise entered step.As linear filling, font, shading etc. are identified as figure.Inline schemes in image
As that will be not considered, area very little, it is impossible to be large area plain net.If current pel be a form when subpage frames, press
According to physical page rule, continue to parse, until parsing minimum pel.
Step 214, if necessary to add local linked network parameter, a temporary file is created, reads the information in original.
Figure then according to operator position, by all data deposit temporary file before the operator, is inserted into Graphic State
XS_GS0 exports active operator, is then inserted into XS_GS1, which is in the XS_GS0, in XS_GS1.For the figure
Member sets the Graphic State XS_GS0 newly built, only includes linked network parameter dictionary in the Graphic State, after drafting, the inside is more
New Graphic State XS_GS1, restores current linked network parameter.Image at this time can't since it is desired that determine whether large area plain net
It determines the need for adding the Graphic State, therefore certain space is added before and after image operator, and record all images pair
The ID number of elephant and its offset in temporary file.Then all the elements after the operator are exported, until meeting next behaviour
As only.After content stream has performed, judge whether the image is large area plain net, if it is, believing according to the image of record
Breath sets local linked network parameter.
It should be noted that if necessary to add local linked network parameter, then a pair of diagram shape is increased newly before and after active operator
State sets the Graphic State GS newly built before operator, linked network parameter dictionary is only included in the Graphic State.It is set after operator
One new Graphic State, for restoring current linked network parameter, and by this in each physical page and the page of each subpage frame
It is registered in the resource of face.In the new PDF of generation, the resource after only registering can be just addressed, and by newly-generated object
It is recorded in Object table.It will be in the setting to current page object of new content flow object.
In the process, it for changing object, then notes down in Object table, and new content record is faced corresponding
When file in, while update the offset in original and the offset in temporary file.
Step 218, new resources are registered.
Step 220, according to Object table, content is exported, generates new pdf document.
The object in Object table is ranked up according to the offset in original first.Secondly according in Object table
Label if not changing object, then according to original offset, obtains corresponding information output in former pdf document;If
It is the object changed, then the temporary file offset in existing object and offset hereof, by new content
Output.Then all object numbers are traversed, it is regular as described above, all the elements are exported.Finally, new file is regenerated
Body is tracked, forms new pdf document.
It in RIP, is identified, whether is identified in the page with part by the local linked network in Page dictionaries in the PDF pages
Linked network parameter.If without local linked network parameter, rasterized by former flow.RIP in processing, newly increase one it is new
Halftone types, for representing local linked network example.It identifies the example, carries out linked network processing.If join with local linked network
Number, and allow using the local linked network parameter in operation, RIP can then be joined using the local linked network in (if present) PDF automatically
Number, without using the linked network parameter set in RIP or the self-defined linked network parameter of PDF operations.
Fig. 3 shows the block diagram according to an embodiment of the invention based on PDF grades of local linked network processing unit.
As shown in figure 3, it is according to an embodiment of the invention based on PDF grades of local linked network processing unit 300, including:It hangs
Network parameters setting unit 302 for adding local linked network parameter for the pel in the pdf document imported, generates new PDF texts
Part;Rasterization unit 304 for reading the local linked network parameter based on the new pdf document, uses the local linked network
Parameter carries out rasterization process.
Wherein, the linked network parameter set unit 302 includes:Resolution unit 3022, for parsing the PDF of importing texts
Part obtains the cross reference table that document track body includes, and Object table is created according to the cross reference table;Construction unit 3024,
For writing the local linked network parameter in the dictionary for describing the Graphic State of specified object, to build new diagram shape
State;Change unit 3026, for change for represent draw pdf document step content stream, in the content stream addition with
The corresponding Graphic State of the part linked network parameter;Updating unit 3028, for carrying out resource to increased local linked network parameter
Registration generates new object and the new object record in the Object table and is updated the Object table and will be repaiied
In content stream deposit temporary file after changing;Generation unit 3030, for generating new document track according to newer Object table
Body and the new pdf document.
When parsing pdf document, it is necessary to parse in File Trailer, File Trailer contain Cross- first
How many object in the reference table and Cross-reference table.Then it is new according to this establishment one
Object table.Whether the Object table can be modified with tagged object.One page has content of pages stream, content resource etc..It is interior
It is exactly that pel element is plotted on the page by a flow object according to instruction to hold stream (contente stream).Resource
(resource) it is exactly some resource objects used in content stream.When parsing pdf document, content stream can be found.According to
Document track body can obtain
In the above-mentioned technical solutions, it is preferred that can also include:First recognition unit 306 is parsing the importing
During the pel of pdf document, figure and image are identified;First judging unit 308 sets corresponding part to hang for the figure
Network parameters for described image, determine whether to add local linked network parameter according to the plain net area of described image, be tied according to judgement
Fruit determines the specified object for needing that local linked network parameter is written.
In the above-mentioned technical solutions, it is preferred that can also include:Unit 310 is identified, in the new pdf document
The middle local linked network mark of addition;Second recognition unit 312 when carrying out rasterization process, is known according to the local linked network mark
Whether with the local linked network in not described new pdf document, when determining with the local linked network parameter, using described
Local linked network parameter carries out rasterization process.
In the above-mentioned technical solutions, it is preferred that can also include:Second judgment unit 314, for scanning the PDF imported
Resource in file judges whether comprising transparent pel, PDF of the linked network parameter set unit only to not including transparent pel
The local linked network parameter of file addition.
Automatic identification large area plain net pel according to the technique and scheme of the present invention sets local linked network parameter, is explained in RIP
When using the linked network parameter for setting special linked network parameter rather than RIP system defines or pel carries, so as to reach better print
Brushing effects.Simultaneously for objects different in PDF, there can be different linked network effects, realize the diversification of linked network.
It is described in detail according to the technique and scheme of the present invention above in association with attached drawing, it is automatic by the device for pdf document
Detection needs to add the pel of local linked network parameter, and set own linked network parameter, generates new PDF.The PDF passes through RIP
The local linked network parameter set to it parses, and for different pels, uses different linked network parameters, the version of linked network output
Material reaches better printing effect after ink jet printing, and a kind of net suspension mode can only be realized by changing previous pdf document, be expanded significantly
Specialty printing application.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, that is made any repaiies
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.