CN101187850A - Electronic document page-by-page printing method - Google Patents

Electronic document page-by-page printing method Download PDF

Info

Publication number
CN101187850A
CN101187850A CNA200610114593XA CN200610114593A CN101187850A CN 101187850 A CN101187850 A CN 101187850A CN A200610114593X A CNA200610114593X A CN A200610114593XA CN 200610114593 A CN200610114593 A CN 200610114593A CN 101187850 A CN101187850 A CN 101187850A
Authority
CN
China
Prior art keywords
elementary cell
segmentation
page
segmentation lines
lines
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.)
Granted
Application number
CNA200610114593XA
Other languages
Chinese (zh)
Other versions
CN101187850B (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 Sursen Electronic Technology Co., Ltd.
Original Assignee
BEIJING SURESENSE INTERNATIONAL INFORMATION TECHNOLOGY 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 BEIJING SURESENSE INTERNATIONAL INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING SURESENSE INTERNATIONAL INFORMATION TECHNOLOGY Co Ltd
Priority to CN200610114593A priority Critical patent/CN101187850B/en
Publication of CN101187850A publication Critical patent/CN101187850A/en
Application granted granted Critical
Publication of CN101187850B publication Critical patent/CN101187850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a paging and printing method for electronic documents, which comprises the procedures that firstly, the size of current printed paper and the size of pages of electronic documents to be printed are assured, and starting position and ending position of current pages to be printed are initialed, secondly, whether the size of pages to be printed are smaller than or are equal to the size of printed papers is judged, if the size of pages to be printed are smaller than or are equal to the size of printed papers, the sixth procedure is switched, and if the pages to be printed are not smaller than or are not equal to the size of printed papers, the third procedure is switched, the third procedure is that basic unit beyond the page edge is cut with the pre-set cutting rule, and final offset of pages to be printed after cut are calculated, wherein the cutting line is the ending position of the printed pages, fourthly, the starting and ending positions of next pages to be printed after the current pages are cut are assured according to the ending position of the current pages, the current final offset, and the height of the current printed papers, and the second procedure is switched, fifthly, pages are printed according to the parameter which is gained. Using the invention, the basic unit which penetrates the cutting line on the printed pages can be displayed in different pages entirely and elegantly.

Description

A kind of electronic document page-by-page printing method
Technical field
The present invention relates to the printing technique of electronic document, be meant a kind of electronic document page-by-page printing method especially.
Background technology
When printing electronic document, above the document various elementary cells can appear, for example the various elementary cells that comprise of the electronic document of the elementary cell that comprises of the electronic document of operating system support such as Windows and the exploitation of inteilectual international corporation.The basic procedure of printing these electronic documents at first loads document files as shown in Figure 1, makes up then to print framework and realize printing function and print.Because electronic document can dynamically increase when filling in, therefore print page needing can appear when printing, the elementary cell that is positioned at page edge needs the situation of Pagination Display, at the Office with Microsoft is that the support of representative is handled in the software of electronic document, generally be that the elementary cell integral body that exceeds this page print range is arranged in down one page demonstration and printing, but this disposal route makes document not directly perceived aspect browsing in integral body, has destroyed the structure of the entire document page; The original Method of printing of inteilectual international corporation has the characteristics of the printing technique of supporting the Office of Microsoft software, and has developed the printing technique of oneself, but aspect the processing print page, also exists and the Office similar problem.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of electronic document page-by-page printing method, realize the elementary cell that exceeds the current page print range being carried out cutting according to the segmentation rules of the present invention's definition and printing.
A kind of electronic document page-by-page printing method comprises following steps:
A. definite current print paper and electronic document are treated the size of printer page, current printer page reference position and the final position treated of initialization;
B. judge and whether treat printer page smaller or equal to the print paper size, if, change step e over to, the formal printing, otherwise change step C;
C. the elementary cell that exceeds page edge is used the segmentation rules that sets in advance and carry out cutting, treat the final side-play amount of printer page after the calculating cutting, wherein segmentation lines is the final position of printer page;
D. determine the next afterwards initial sum final position for the treatment of printer page of current page cutting according to current page final position, current final side-play amount and print paper height, change step B;
E. according to the formal printer page of parameter that obtains.
Further comprise before the described step B of this method, the coordinate system of the electronic document page is converted into the coordinate system of the preview view of printing.
The described step C of this method determines to treat according to segmentation rules further to comprise in the process of final side-play amount of printer page:
C1. the current segmentation lines side-play amount of initialization;
If C2. segmentation lines is not cut apart any elementary cell, change step C6; Otherwise get first elementary cell on the segmentation lines;
C3. judge this elementary cell if container elementary cell and comprise this unit of subbase is then changeed step C4;
Not not the container elementary cell but do not comprise this unit of subbase if this elementary cell is not container elementary cell or this elementary cell, then use this elementary cell of segmentation rules cutting that sets in advance, the side-play amount after this elementary cell cutting is measured in the segmentation lines skew, if judging the segmentation lines side-play amount changes, change step C2, otherwise change C5;
C4. enumerate this unit of subbase of being cut apart by segmentation lines in this container elementary cell, be the container elementary cell and comprise this unit of subbase if judge this unit of subbase, then its this unit of subbase of being cut apart by segmentation lines of recursively enumerate;
If existing is not this unit of subbase of container elementary cell or this unit of container subbase that no longer comprises this unit of subbase, and the side-play amount of this this unit of subbase is not equal to the segmentation lines side-play amount, then the side-play amount of this this unit of subbase is measured in the segmentation lines skew, changes step C2, otherwise changes step C5;
If C5. judge on the segmentation lines still to have divided elementary cell, enumerate the next elementary cell of being cut apart by segmentation lines, change step C3, otherwise change step C6;
C6. exporting the segmentation lines side-play amount is final side-play amount.
In this method, there are header or footer, further comprise before the then described step D if treat printer page:
(1). the migration parameter of the header and footer of printer page is treated in initialization, judges whether to exist header, if exist, then changes step (2), otherwise changes step (3);
(2). judge whether current print range comprises header, if revise migration parameter, otherwise change step (3);
(3). judge whether to exist footer,, revise migration parameter, otherwise current migration parameter is a net result if exist;
The described step e of this method further comprises: the current number of printer page adds up 1, judges whether also to exist and treats printer page, if exist, continues to print, otherwise returns printer page number.
When this method utilized standard plug-in unit to realize on windows platform, described standard plug-in unit comprised at least: object linking and embedding plug-in unit, object linking and embedding control expansion plugin, ActiveX plug-in unit.
Described step C2 of this method or C3 further comprise respectively, judge the type of current elementary cell, determine the side-play amount of current elementary cell according to its type selecting segmentation rules.
The described segmentation rules of this method specifically comprises: the segmentation rules of common elementary cell; The segmentation rules of text box; The segmentation rules of form and check box; The segmentation rules of straight line, circle, rectangle; The principle that elementary cell on same segmentation lines is got maximum offset; The principle that maximization shows; Elementary cell relative position principle of invariance and outer rim are extended principle.
The segmentation rules of the described common elementary cell of this method is: when elementary cell can not show fully at a page, be displaced to the next page.
The segmentation rules of the described TextBox elementary cell of this method is: TextBox elementary cell that single file shows and multirow show but the TextBox elementary cell that highly is lower than regulation numerical value is followed common elementary cell segmentation rules; Multirow shows but the TextBox elementary cell that highly is higher than regulation numerical value is followed following rule: if the text message in the elementary cell can complete demonstration then do not done skew; If the text message in the elementary cell is cut out a part, the line of text that cuts out need be displaced to down one page.
The segmentation rules of described Table of this method and Repeat elementary cell comprises: on the form entity of segmentation lines in electronic document, segmentation lines in gauge outfit, segmentation lines in three kinds of situations of table tail.
In described form of this method and the check box elementary cell, the segmentation rules of segmentation lines on the form entity is:
A., the situation that the table tail is arranged: with the make progress skew of tabulation tail height distance of segmentation lines,
A1. if segmentation lines is offset out the form entity, then form is displaced to down one page demonstration together with gauge outfit;
The skew of the tabulation tail height distance that a2. segmentation lines made progress, if segmentation lines is also in the form entity, if this moment, segmentation lines did not have the cutting table row, for example segmentation lines just and the coincidence of form line, then page up shows the cell on this segmentation lines; If segmentation lines cutting this moment to table row, is taken out by the current line of segmentation lines cutting, handle according to the segmentation rules of TextBox elementary cell; If also have elementary cell in the cell this moment, handle with reference to the segmentation rules of corresponding elementary cell;
B. do not show the situation of tail: handle according to regular a1 and regular a2.
In described form of this method and the check box elementary cell, segmentation lines in the segmentation rules of gauge outfit is: whole form is displaced to one page demonstration down together with headers and footers
In described form of this method and the check box elementary cell, segmentation lines in the segmentation rules of table tail is: with the make progress skew of tabulation tail height distance of segmentation lines, handle according to regular a1 and regular a2.
The segmentation rules of the described straight line of this method, circle, rectangle elementary cell is: shown in two pages respectively by two parts of cutting according to segmentation lines.
The principle that elementary cell on described same the segmentation lines of this method is got maximum offset is: may have a plurality of elementary cells on same the segmentation lines and exist, the maximal value of the side-play amount of each elementary cell is measured in final skew.
The principle that the described maximization of this method shows is: the elementary cell on the initial segmentation lines should show in page up according to the content on the segmentation lines position of itself calculating when Pagination Display, needn't follow the position of final segmentation lines and handle.
This method described elementary cell relative position principle of invariance and outer rim are extended principle: two pages of demonstrations, staggered elementary cell is arranged especially in the horizontal direction by cutting, the relative position between them should remain unchanged; When elementary cell because the position of each sub-segmentation lines is different when having dislocation for second page, elementary cell should be stretched with elementary cell around the coupling, the content information that showed at page up there is no need to repeat demonstration at following one page.
In this method, when described electronic document was electronic spreadsheet, described elementary cell was a standard control.
In this method,, then the page is directly carried out cutting and no longer adjust if described segmentation lines causes page size less than predefined numerical value after constantly adjusting.
Electronic document page-by-page printing method of the present invention, realized the technological means of the predefined segmentation rules of the present invention, solved in original technology, the elementary cell integral body that exceeds this page print range is arranged in down one page demonstration and printing, and that the document integral body that causes is browsed is not directly perceived, the ruined situation of entire document page structure.And technology of the present invention can realize in the standard plug-in unit of several operation systems platform support, has reduced the coupling between the software of realizing module of the present invention and realizing printing function originally.
Description of drawings
The basic procedure synoptic diagram of Fig. 1 for printing;
Fig. 2 prints the framework synoptic diagram for the MFC that Windows supports;
Fig. 3 is the calculation process synoptic diagram of printer page;
Fig. 4 is for to get the schematic flow sheet of final side-play amount according to segmentation lines;
Fig. 5 is common elementary cell segmentation rules synoptic diagram;
Fig. 6 is a text box elementary cell segmentation rules synoptic diagram;
Fig. 7 is form and check box elementary cell segmentation rules synoptic diagram;
Fig. 8 gets the synoptic diagram of maximum offset principle for the elementary cell on the same segmentation lines;
Fig. 9 shows the synoptic diagram of principle for maximization;
Figure 10 is the synoptic diagram that elementary cell relative position principle of invariance and outer rim are extended principle.
Embodiment
Because electronic document can dynamically increase when filling in, therefore the situation of print page can appear when printing, and the elementary cell that be positioned at the page edge this moment just needs Pagination Display.For page display effect preferably after realizing printing, among the present invention,, utilize the virtual line cutting page to be printed at the final position place of a current type face at the page edge of paging, this virtual line is called segmentation lines, and has realized some printing segmentation rules.
Thinking of the present invention is: for the coupling between the software (mainly being meant office software or corresponding operating system) that reduces print module and original realization printing function, print module is designed to the standard plug-in unit that an operating system is supported, or as an original patch that increases new function realizing the software of printing function; When using, standard plug-in unit or patch are embedded in the software of original realization printing function, realize function of the present invention.
Embodiment 1:
Present embodiment has been described the workflow of technical solution of the present invention, realizes the elementary cell that exceeds the current page print range being carried out cutting according to the segmentation rules of the present invention's definition and printing; The workflow of describing can realize on a plurality of operating system platforms.If segmentation lines causes page size less than predefined numerical value after constantly adjusting, then the page is directly carried out cutting and print getting final product, and needn't adjust again.
Be described in detail below in conjunction with 3 pairs of preferred embodiments of the present invention of accompanying drawing.
Step 301 obtains the print paper size of current printer, comprises height nPrintPageHeight, the paper width nPrintPageWidth of print paper; The current page number of having printed is set to 0.
Step 302 determines to wait to print the height nPageHeight of the electronic document page, pagewidth nPageWidth.
Step 303, initialization current page reference position nStartPos is 0, type face final position nEndPos=nStartPos+nPrintPageHeight then, wherein nPrintPageHeight is a paper height.
Step 304, the coordinate of the elementary cell in the electronic document are that the upper left corner with document file page is true origin, and coordinate system of this and the preview view printed has conflict; The coordinate system of document file page is converted into the coordinate system of the preview view of printing, normally with the preview view initial point printed to the upper left origin position that is displaced to the document coordinate system, the content of the current document page correctly is presented in the preview view of printing.
Step 305 is judged and whether is waited to print electronic document page height nPageHeight greater than print paper height nPrintPageHeight, if, just need the cutting page, enter step 306; Otherwise change step 313 over to.
Step 306 during the cutting page, as segmentation lines, changes the flow process of obtaining final side-play amount according to segmentation lines with type face final position nEndPos over to, and the idiographic flow that obtains final side-play amount is obtained the final side-play amount nAppendHeight of current page as shown in Figure 4.
Step 307 judges whether to exist header, if change step 308, otherwise changes step 310.
Step 308 judges whether the scope of current printing has comprised header, if change step 310, otherwise change step 309.
Step 309 adds the header height with height parameter nOffset.
Step 310 judges whether to exist footer, if exist, changes step 311, otherwise changes step 312.
Step 311, height parameter nOffset adds the footer height.
Step 312 is calculated the reference position nStartPos=nEndPos-nAppendHeight-nOffset and the final position nEndPos=nEndPos+nPrintPageHeight of the next page by the final position nEndPos of current page; After finishing the calculating of current page, forward step 304 to, calculate the cutting side-play amount of one page down.
Step 313, printer page, and the current number of printer page added 1.
Step 314 judges whether the page in addition, if having, changes step 302, otherwise changes step 315.
Step 315 is returned the printer page number, prints and finishes.
Wherein step 306 is determined to treat according to segmentation rules further to comprise in the process of final side-play amount of printer page as shown in Figure 4:
Step 401, the current segmentation lines side-play amount of initialization.
If step 402. segmentation lines is not cut apart any elementary cell, change step 410; Otherwise get first elementary cell on the segmentation lines.
Step 403. judges whether this elementary cell is the container elementary cell and comprises this unit of subbase, if change step 406, otherwise changes step 404.
This elementary cell of step 404. is not that container elementary cell or this elementary cell are the container elementary cells but do not comprise this unit of subbase, and then the side-play amount of this elementary cell is measured in the segmentation lines skew.
Change step 402, otherwise change step 405.
Step 405. judges whether the segmentation lines side-play amount changes, if change step 402, otherwise change step 408.
Step 406. is enumerated this unit of subbase of being cut apart by segmentation lines in this container elementary cell, if this unit of subbase is container elementary cell then its this unit of subbase of being cut apart by segmentation lines of recursively enumerate.
Whether step 407. exists this unit of subbase that is not the container elementary cell or this unit of container subbase that no longer comprises this unit of subbase, and the side-play amount of this this unit of subbase is not equal to the segmentation lines side-play amount, then the side-play amount of this this unit of subbase is measured in the segmentation lines skew, change step 402, otherwise change step 408.
If judging on the segmentation lines, step 408. still has divided elementary cell.
Step 409. is enumerated the next elementary cell of being cut apart by segmentation lines, changes step 403, otherwise changes step 410.
Step 410. output segmentation lines side-play amount is final side-play amount.
When electronic document comprised various elementary cell, above-mentioned elementary cell was the various elementary cells that current operation system is supported; Wherein determine the method for the final side-play amount of all elementary cells in the above-mentioned steps, realized segmentation rules of the present invention, described segmentation rules specifically comprises:
A) segmentation rules of common elementary cell;
B) segmentation rules of text box (TextBox) elementary cell;
C) segmentation rules of form (Table) and final election (Repeat) elementary cell;
D) segmentation rules of straight line (Line), circle (Circle), rectangle (Rectangle) elementary cell;
E) principle of getting maximum offset of the elementary cell on same segmentation lines;
F) principle of maximization demonstration;
G) elementary cell relative position principle of invariance and outer rim are extended principle.
Describe the segmentation rules of the present invention's definition in detail below in conjunction with accompanying drawing 5~10:
A) segmentation rules of common elementary cell as shown in Figure 5, the line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment; When common elementary cell can not show fully at a page, the elementary cell overall offset is arrived the next page.
B) segmentation rules of text box TextBox elementary cell as shown in Figure 6, the line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment; TextBox that single file shows among Fig. 6 A and multirow show but highly be lower than and equal regulation numerical value, 40 pixels for example, the TextBox elementary cell follow common elementary cell segmentation rules; Multirow shows but the TextBox elementary cell that highly is higher than regulation numerical value is followed following rule among Fig. 6 B: if the text message in the elementary cell can complete demonstration then do not done skew; If the text message in the elementary cell is cut out a part, the line of text that cuts out need be displaced to down one page, Fig. 6 C is its printing effect figure.
C) segmentation rules of form Table and check box Repeat elementary cell as shown in Figure 7, the line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment; Fig. 7 A be row height in equaling to predesignate numerical value, the situation of 40 pixels for example, wherein Xia Mian line is the position at initial segmentation lines place, top line is segmentation lines adjustment position afterwards; Fig. 7 B is the situation that the row height is higher than regulation numerical value, and Fig. 7 C is its printing effect figure.
The concrete segmentation rules of Table and Repeat elementary cell be divided into segmentation lines on the form entity, segmentation lines in gauge outfit, segmentation lines in three kinds of situations of table tail.
C-1) segmentation rules of segmentation lines on the form entity is meant:
C-1-1) situation of showing tail is arranged, segmentation lines is upwards done the skew of table tail height distance:
1. if segmentation lines is offset out the form entity, then form is displaced to down one page demonstration together with gauge outfit.
If segmentation lines also in the form entity, if this moment, segmentation lines did not have the cutting table row, for example segmentation lines just and the coincidence of form line, then page up shows the cell on this segmentation lines; If segmentation lines cutting this moment to table row, is taken out by the current line of segmentation lines cutting, handle according to the segmentation rules of TextBox elementary cell; If also have elementary cell in the cell this moment, handle with reference to the segmentation rules of corresponding elementary cell.
C-1-2) do not show the situation of tail: according to regular c-1-1) in 1 and 2 rule treatments.
C-2) segmentation lines is meant in the segmentation rules of gauge outfit: whole form is displaced to one page demonstration down together with headers and footers.
C-3) segmentation lines is meant in the segmentation rules of table tail: with the make progress skew of tabulation tail height of segmentation lines, according to regular c-1-1) in 1 and 2 rule handle.
D) segmentation rules of Line, Circle, Rectangle elementary cell is meant: additionally do not adjust, shown in two pages respectively by two parts of cutting according to initial segmentation lines.
E) elementary cell on same segmentation lines get maximum offset principle as shown in Figure 8, line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment, and middle line is initial segmentation lines adjusted position on the input frame elementary cell; May have a plurality of elementary cells on same the segmentation lines and exist, the maximal value of the side-play amount of each elementary cell is measured in final skew.
F) principle that shows of maximization as shown in Figure 9, the line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment, and middle line is initial segmentation lines adjusted position on the multiple-line entry box elementary cell; Fig. 9 B is the printing effect figure of page up, and Fig. 9 C is the printing effect figure of following one page.Elementary cell on the initial segmentation lines is when Pagination Display, and according to the position of the final segmentation lines of calculating itself, the above content of final segmentation lines should show in page up that needn't follow the position of final segmentation lines and handle, Fig. 9 A is the design sketch after the cutting.
G) elementary cell relative position principle of invariance and outer rim are extended principle as shown in figure 10, line below among the figure is the position at initial segmentation lines place, top line is the position after the segmentation lines adjustment, and middle line is initial segmentation lines adjusted position on the multiple-line entry box elementary cell; Figure 10 B is the printing effect figure of page up, and Figure 10 C is the printing effect figure of following one page.Two pages of demonstrations, staggered elementary cell is arranged in the horizontal direction particularly by cutting, the relative position between them should remain unchanged; When elementary cell because the position of each sub-segmentation lines is different when having dislocation for second page, elementary cell should be stretched with elementary cell around the coupling, the content information that showed at page up needn't repeat to show that Figure 10 A is the design sketch after its cutting at following one page.
Among the present invention, the technical scheme that the foregoing description is described can realize on a plurality of operating system system platforms, but when described electronic document was electronic spreadsheet, then described elementary cell can be any standard control that can realize on electronic spreadsheet.
Embodiment 2:
When operating system platform is Windows, described standard plug-in unit can be object linking and embed control expansion (OCX, OLE Control Extension) plug-in unit, ActiveX plug-in unit and other plug-in unit, can in standard plug-in unit, introduce microsoft foundation class storehouse (MFC, Microsoft Foundation Classes) the printing frame clsss in, and print framework based on MFC and realize Method of printing of the present invention.Method of printing specifically comprises: determine that current print paper and electronic document treat the size of printer page, if treat printer page smaller or equal to the print paper size, then normally print, carry out cutting otherwise use segmentation rules; During the cutting page, print the final side-play amount that segmentation rules in the framework determines to treat printer page, determine to treat the headerfooter height of printer page simultaneously according to the MFC that is packaged in standard plug-in unit; Formal then printer page, and calculate the next print parameters for the treatment of printer page, prepare for print next time.
Described standard plug-in unit is a kind of Windows program module of independent standard, can be by other routine access under the Windows environment, and therefore the method for the present invention that realizes based on standard plug-in unit can be used to print the document of any support Windows elementary cell.
As shown in Figure 2, print framework based on MFC and realize function of the present invention, described MFC prints printing and the Print Preview function code that framework provides framework, and basic thought of the present invention is that the run time version of actual preview and document printing and said frame code are integrated, and specifically comprises:
Step 201 after beginning to print, is called and is printed frame clsss CMainFrameS, and create the object of printing frame clsss, the variable parameter of initialization object the inside.
Step 202 is called printing interface function C MainFrameS::PrintPreView, moves conventional Print Preview.
Step 203 is called class CWrapperView, the object of the view that makes preview.
Step 204 sends direct print request, and changes step 206.
Step 205, Print Preview, and change step 207 over to.
Wherein, step 203,204,205 realization is in no particular order.
Step 206 is called class CWrapperView, realizes printf wherein, and the response print request is directly printed.
Step 207 is created the demonstration view.
Step 208, it shows that view has comprised the preview view that create front 203, it is according to outer setting information correction preview view and demonstration.
Even but the present invention also is not limited to utilize MFC printing framework to realize technical scheme of the present invention on windows platform, can directly call the local function of windows platform and realize Method of printing of the present invention; Also can call the function of corresponding realization printing function in the java class storehouse and realize Method of printing of the present invention.In a word, method provided by the invention can be applied in the print procedure of electronic document flexibly.
On other operating system, Linux for example, on the operating systems such as Solaris, the respective standard plug-in unit that technology of the present invention can be by being embedded into the operating system support or realize as any form that electronic document can use.
From top embodiment as can be seen, method provided by the invention has effectively solved the defective that the printing paging technique in the current various software exists, technology of the present invention not only can be applied to the electronic document of inteilectual international corporation design itself, also can be applied to the electronic file form on any operating system platform, above-mentioned is preferred embodiment of the present invention only, and is not in order to limit the present invention.

Claims (20)

1. an electronic document page-by-page printing method is characterized in that, comprises following steps:
A. definite current print paper and electronic document are treated the size of printer page, current printer page reference position and the final position treated of initialization;
B. judge and whether treat printer page smaller or equal to the print paper size, if, change step e over to, the formal printing, otherwise change step C;
C. the elementary cell that exceeds page edge is used the segmentation rules that sets in advance and carry out cutting, treat the final side-play amount of printer page after the calculating cutting, wherein segmentation lines is the final position of printer page;
D. determine the next afterwards initial sum final position for the treatment of printer page of current page cutting according to current page final position, current final side-play amount and print paper height, change step B;
E. according to the formal printer page of parameter that obtains.
2. method according to claim 1 is characterized in that, further comprises before the described step B, the coordinate system of the electronic document page is converted into the coordinate system of the preview view of printing.
3. method according to claim 1 is characterized in that, described step C determines to treat according to segmentation rules further to comprise in the process of final side-play amount of printer page:
C1. the current segmentation lines side-play amount of initialization;
If C2. segmentation lines is not cut apart any elementary cell, change step C6; Otherwise get first elementary cell on the segmentation lines;
C3. judge this elementary cell if container elementary cell and comprise this unit of subbase is then changeed step C4;
Not not the container elementary cell but do not comprise this unit of subbase if this elementary cell is not container elementary cell or this elementary cell, then use this elementary cell of segmentation rules cutting that sets in advance, the side-play amount after this elementary cell cutting is measured in the segmentation lines skew, if judging the segmentation lines side-play amount changes, change step C2, otherwise change C5;
C4. enumerate this unit of subbase of being cut apart by segmentation lines in this container elementary cell, be the container elementary cell and comprise this unit of subbase if judge this unit of subbase, then its this unit of subbase of being cut apart by segmentation lines of recursively enumerate;
If existing is not this unit of subbase of container elementary cell or this unit of container subbase that no longer comprises this unit of subbase, and the side-play amount of this this unit of subbase is not equal to the segmentation lines side-play amount, then the side-play amount of this this unit of subbase is measured in the segmentation lines skew, changes step C2, otherwise changes step C5;
If C5. judge on the segmentation lines still to have divided elementary cell, enumerate the next elementary cell of being cut apart by segmentation lines, change step C3, otherwise change step C6;
C6. exporting the segmentation lines side-play amount is final side-play amount.
4. method according to claim 1 is characterized in that, has header or footer if treat printer page, further comprises before the then described step D:
(1). the migration parameter of the header and footer of printer page is treated in initialization, judges whether to exist header, if exist, then changes step (2), otherwise changes step (3);
(2). judge whether current print range comprises header, if revise migration parameter, otherwise change step (3);
(3). judge whether to exist footer,, revise migration parameter, otherwise current migration parameter is a net result if exist.
5. method according to claim 1 is characterized in that, described step e further comprises: the current number of printer page adds up 1, judges whether also to exist and treats printer page, if exist, continues to print, otherwise returns printer page number.
6. method according to claim 1, it is characterized in that when described method utilized standard plug-in unit to realize, described standard plug-in unit comprised at least on windows platform: object linking and embedding plug-in unit, object linking and embedding control expansion plugin, the ActiveX plug-in unit.
7. method according to claim 3 is characterized in that, described step C2 or C3 further comprise respectively, judge the type of current elementary cell, determines the side-play amount of current elementary cell according to its type selecting segmentation rules.
8. according to any described method of claim 1 to 7, it is characterized in that described segmentation rules specifically comprises: the segmentation rules of common elementary cell; The segmentation rules of text box; The segmentation rules of form and check box; The segmentation rules of straight line, circle, rectangle; The principle that elementary cell on same segmentation lines is got maximum offset; The principle that maximization shows; Elementary cell relative position principle of invariance and outer rim are extended principle.
9. method according to claim 8 is characterized in that, the segmentation rules of described common elementary cell is: when elementary cell can not show fully at a page, be displaced to the next page.
10. method according to claim 8, it is characterized in that the segmentation rules of described TextBox elementary cell is: TextBox elementary cell that single file shows and multirow show but the TextBox elementary cell that highly is lower than regulation numerical value is followed common elementary cell segmentation rules; Multirow shows but the TextBox elementary cell that highly is higher than regulation numerical value is followed following rule: if the text message in the elementary cell can complete demonstration then do not done skew; If the text message in the elementary cell is cut out a part, the line of text that cuts out need be displaced to down one page.
11. method according to claim 8 is characterized in that, the segmentation rules of described Table and Repeat elementary cell comprises: on the form entity of segmentation lines in electronic document, segmentation lines in gauge outfit, segmentation lines in three kinds of situations of table tail.
12. method according to claim 11 is characterized in that, in described form and the check box elementary cell, the segmentation rules of segmentation lines on the form entity is:
A., the situation that the table tail is arranged: with the make progress skew of tabulation tail height distance of segmentation lines,
A1. if segmentation lines is offset out the form entity, then form is displaced to down one page demonstration together with gauge outfit;
The skew of the tabulation tail height distance that a2. segmentation lines made progress, if segmentation lines is also in the form entity, if this moment, segmentation lines did not have the cutting table row, for example segmentation lines just and the coincidence of form line, then page up shows the cell on this segmentation lines; If segmentation lines cutting this moment to table row, is taken out by the current line of segmentation lines cutting, handle according to the segmentation rules of TextBox elementary cell; If also have elementary cell in the cell this moment, handle with reference to the segmentation rules of corresponding elementary cell;
B. do not show the situation of tail: handle according to regular a1 and regular a2.
13. method according to claim 11 is characterized in that, in described form and the check box elementary cell, segmentation lines in the segmentation rules of gauge outfit is: whole form is displaced to one page demonstration down together with headers and footers.
14. method according to claim 11 is characterized in that, in described form and the check box elementary cell, segmentation lines in the segmentation rules of table tail is: with the make progress skew of tabulation tail height distance of segmentation lines, handle according to regular a1 and regular a2.
15. method according to claim 8 is characterized in that, the segmentation rules of described straight line, circle, rectangle elementary cell is: shown in two pages respectively by two parts of cutting according to segmentation lines.
16. method according to claim 8, it is characterized in that, the principle that elementary cell on described same the segmentation lines is got maximum offset is: may have a plurality of elementary cells on same the segmentation lines and exist, the maximal value of the side-play amount of each elementary cell is measured in final skew.
17. method according to claim 8, it is characterized in that, the principle that described maximization shows is: the elementary cell on the initial segmentation lines is when Pagination Display, should in page up, show according to the content on the segmentation lines position of itself calculating, needn't follow the position of final segmentation lines and handle.
18. method according to claim 8, it is characterized in that, described elementary cell relative position principle of invariance and outer rim are extended principle: two pages of demonstrations, staggered elementary cell is arranged especially in the horizontal direction by cutting, the relative position between them should remain unchanged; When elementary cell because the position of each sub-segmentation lines is different when having dislocation for second page, elementary cell should be stretched with elementary cell around the coupling, the content information that showed at page up there is no need to repeat demonstration at following one page.
19. method according to claim 1 is characterized in that, when described electronic document was electronic spreadsheet, described elementary cell was a standard control.
20. method according to claim 1 is characterized in that, if described segmentation lines causes page size less than predefined numerical value after constantly adjusting, then the page is directly carried out cutting and no longer adjusts.
CN200610114593A 2006-11-16 2006-11-16 Electronic document page-by-page printing method Active CN101187850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200610114593A CN101187850B (en) 2006-11-16 2006-11-16 Electronic document page-by-page printing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610114593A CN101187850B (en) 2006-11-16 2006-11-16 Electronic document page-by-page printing method

Publications (2)

Publication Number Publication Date
CN101187850A true CN101187850A (en) 2008-05-28
CN101187850B CN101187850B (en) 2010-05-26

Family

ID=39480267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610114593A Active CN101187850B (en) 2006-11-16 2006-11-16 Electronic document page-by-page printing method

Country Status (1)

Country Link
CN (1) CN101187850B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820487A (en) * 2009-02-27 2010-09-01 柯尼卡美能达商用科技株式会社 Terminal installation, print process system, print processing method and print control unit
CN102722899A (en) * 2012-05-28 2012-10-10 重庆大学 Positioning printing system for report
CN103617013A (en) * 2013-12-13 2014-03-05 天津书生软件技术有限公司 Printing method and device
CN103856498A (en) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 Method and device for displaying information
CN104571978A (en) * 2015-01-09 2015-04-29 中科宇图天下科技有限公司 Method for paging and printing documents based on HTML (Hypertext Markup Language) labels
CN108399054A (en) * 2018-02-28 2018-08-14 北京春草软件科技有限责任公司 A kind of document cutting Method of printing
CN108846109A (en) * 2018-06-22 2018-11-20 广州中康资讯股份有限公司 A kind of the file guiding system and method for achievable intelligent paging
CN109324771A (en) * 2018-10-26 2019-02-12 苏州浪潮智能软件有限公司 A kind of self-service apparatus for returning-back of bills intelligence print page technology based on HTML analytic technique
CN109426458A (en) * 2017-09-04 2019-03-05 阿里巴巴集团控股有限公司 A kind of Method of printing and device of relational graph
CN113268209A (en) * 2021-05-14 2021-08-17 深圳市领星网络科技有限公司 Method and device for creating custom document printing template and computer equipment
CN113627133A (en) * 2020-05-08 2021-11-09 珠海金山办公软件有限公司 Page splitting method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661255A (en) * 2022-05-18 2022-06-24 江苏中威科技软件系统有限公司 Method and system for paging printing of dynamic forms supporting vector handwriting and pictures

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100361067C (en) * 2004-12-31 2008-01-09 东友科技股份有限公司 Paging method for printing file

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820487A (en) * 2009-02-27 2010-09-01 柯尼卡美能达商用科技株式会社 Terminal installation, print process system, print processing method and print control unit
CN102722899A (en) * 2012-05-28 2012-10-10 重庆大学 Positioning printing system for report
CN102722899B (en) * 2012-05-28 2015-04-15 重庆大学 Positioning printing system for report
CN103856498B (en) * 2012-11-29 2017-03-29 腾讯科技(深圳)有限公司 A kind of method and device of presentation of information
CN103856498A (en) * 2012-11-29 2014-06-11 腾讯科技(深圳)有限公司 Method and device for displaying information
CN103617013A (en) * 2013-12-13 2014-03-05 天津书生软件技术有限公司 Printing method and device
CN103617013B (en) * 2013-12-13 2017-02-01 天津书生软件技术有限公司 Printing method and device
CN104571978B (en) * 2015-01-09 2017-11-21 中科宇图天下科技有限公司 A kind of method that document print page is carried out based on html tag
CN104571978A (en) * 2015-01-09 2015-04-29 中科宇图天下科技有限公司 Method for paging and printing documents based on HTML (Hypertext Markup Language) labels
CN109426458A (en) * 2017-09-04 2019-03-05 阿里巴巴集团控股有限公司 A kind of Method of printing and device of relational graph
CN109426458B (en) * 2017-09-04 2022-05-17 阿里巴巴集团控股有限公司 Method and device for printing relation graph
CN108399054A (en) * 2018-02-28 2018-08-14 北京春草软件科技有限责任公司 A kind of document cutting Method of printing
CN108846109A (en) * 2018-06-22 2018-11-20 广州中康资讯股份有限公司 A kind of the file guiding system and method for achievable intelligent paging
CN109324771A (en) * 2018-10-26 2019-02-12 苏州浪潮智能软件有限公司 A kind of self-service apparatus for returning-back of bills intelligence print page technology based on HTML analytic technique
CN113627133A (en) * 2020-05-08 2021-11-09 珠海金山办公软件有限公司 Page splitting method and device
CN113268209A (en) * 2021-05-14 2021-08-17 深圳市领星网络科技有限公司 Method and device for creating custom document printing template and computer equipment

Also Published As

Publication number Publication date
CN101187850B (en) 2010-05-26

Similar Documents

Publication Publication Date Title
CN101187850B (en) Electronic document page-by-page printing method
JPH10340330A (en) Display image arranging method
KR100585312B1 (en) Method for printing web page
CN105160343A (en) Information identification method and device applied to film on-demand-printing system
JP5387285B2 (en) Printing apparatus and program
US20100299375A1 (en) Methods and Devices for Incorporating PDF Files
CN101673193B (en) Printing control apparatus and printing control method
US8477363B2 (en) Table data processing apparatus for creating table data containing complete formulas
CN103744630B (en) A kind of distributed print control program and system
CN110489728A (en) Legal documents automatic composing method and device
CN105068984A (en) Automatic puzzling and typesetting method
CN102541478B (en) Page splitting method and device
CN105183709B (en) A kind of EXCEL preliminary budgets tabular matter method
CN112528599B (en) XML-based multi-page document processing method, device, computer equipment and medium
JP7009793B2 (en) Print control device, print control program and print control method
CN106293553B (en) Method of cutting out and device, the storage medium and processor of drawing
JP4306725B2 (en) Printing support system, printing support program, and printing support method
CN113962193A (en) Table typesetting method and device, electronic equipment and storage medium
CN111552447A (en) Printing method and system
CN103942187A (en) Page makeup method and device
CN106648481A (en) Processing method and device and printing control method and device
JP2000134458A (en) Image processing method and its system
CN102446166B (en) Adjustment method and device for large-version layout
JP6918610B2 (en) Image processing equipment and programs
JP2021189648A (en) Information processing device, information processing method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: BEIJING SURSEN ELECTRONIC TECHNOLOGY CO., LTD. BEI

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100083 13/F, SHINING BUILDING, NO.35, XUEYUAN ROAD, HAIDIAN DISTRICT, BEIJING TO: 100191 ROOM 407, TAIXING BUILDING, NO.11, HUYUAN EAST ROAD, HAIDIAN DISTRICT, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20101101

Address after: 100191, room 407, Taixing building, 11 Garden East Road, Beijing, Haidian District

Co-patentee after: Beijing Sursen Electronic Technology Co., Ltd.

Patentee after: Beijing Suresense International Information Technology Co., Ltd.

Co-patentee after: Beijing Sursen Network Technology Co., Ltd.

Co-patentee after: Beijing Sursen Digital Library Software Technology Co., Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 13 floor

Patentee before: Beijing Suresense International Information Technology Co., Ltd.

ASS Succession or assignment of patent right

Owner name: BEIJING SURSEN ELECTRONIC TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING SURESENSE INTERNATIONAL INFORMATION TECHNOLOGY CO., LTD.

Effective date: 20111206

Owner name: TIANJIN SURSEN SOFTWARE TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING SURSEN ELECTRONIC TECHNOLOGY CO., LTD. BEIJING SURSEN NETWORK TECHNOLOGY CO., LTD. BEIJING SURSEN DIGITAL LIBRARY SOFTWARE TECHNOLOGY CO., LTD.

Effective date: 20111206

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20111206

Address after: 100191, room 407, Taixing building, 11 Garden East Road, Beijing, Haidian District

Co-patentee after: Tianjin Scholar Software Technology Co., Ltd.

Patentee after: Beijing Sursen Electronic Technology Co., Ltd.

Address before: 100191, room 407, Taixing building, 11 Garden East Road, Beijing, Haidian District

Co-patentee before: Beijing Sursen Electronic Technology Co., Ltd.

Patentee before: Beijing Suresense International Information Technology Co., Ltd.

Co-patentee before: Beijing Sursen Network Technology Co., Ltd.

Co-patentee before: Beijing Sursen Digital Library Software Technology Co., Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181129

Address after: 100029 Changxin Building 408-409, 39 Anding Road, Chaoyang District, Beijing

Patentee after: Beijing Sursen Electronic Technology Co., Ltd.

Address before: Room 407, Taixing Building, 11 Garden East Road, Haidian District, Beijing, 100191

Co-patentee before: Tianjin Scholar Software Technology Co., Ltd.

Patentee before: Beijing Sursen Electronic Technology Co., Ltd.

DD01 Delivery of document by public notice

Addressee: Zhao Xin

Document name: Notification of Passing Examination on Formalities

DD01 Delivery of document by public notice