Embodiment
Fig. 1 is the flow chart of e-book processing method embodiment one provided by the invention, as shown in figure 1, the present embodiment carries
The e-book processing method of confession, it is not only suitable for obtaining electronics from e-book making apparatus as the subscriber terminal equipment of reader
Carry out the scene of typesetting processing after book to e-book in local, now, subscriber terminal equipment needs to combine itself screen size pair
E-book carries out typesetting processing;It is applied to e-book keeper again to carry out e-book when making e-book by making apparatus
The scene of typesetting processing, now, making apparatus, which needs to combine, is sent to the subscriber terminal equipment or more that e-book obtains request
The screen size information of its terminal device known in advance of kind carries out typesetting processing to e-book, so that different terminal equipment is to electricity
The philosophical works carries out reading presentation.The e-book processing method that the present embodiment provides can be performed by a processing unit, processing dress
The difference according to above two application scenarios is put, can be both integrated in e-book making apparatus, can also be integrated in as readding
In the subscriber terminal equipment for reading device, it can also be separately provided.
The e-book processing method that the present embodiment provides includes:
Step 101, e-book typesetting instruction is received, obtain the screen size for the user terminal for needing to show the e-book
Information;
Step 102, according to the screen size information, typesetting processing is carried out to each data element in the e-book, obtained
To the eBook content being adapted with the screen size of the user terminal.
, both can be by the processing in e-book making apparatus according to the difference of above two application scenarios in the present embodiment
Device completes e-book typesetting processing procedure, can also be completed pair by the processing unit in the user terminal as reader
The typesetting processing procedure of its e-book obtained from making apparatus.But the method system of being particularly suitable for use in that the present embodiment provides
Make equipment and typesetting processing is carried out to e-book in e-book manufacturing process, meanwhile, get in reader and handled by typesetting
E-book after, typesetting again is carried out to e-book using with identical processing method in making apparatus, and then finally presented through again
The scene of eBook content after typesetting.That is, using identical with making apparatus in the user terminal as reader
Typesetting engine to e-book carry out typesetting again, equivalent to once " decoding operate ", be advantageous to avoid universal in the prior art
The problem of caused composition information is lost or made a mistake directly is being presented in the e-book of use on reader, be also beneficial to protect
Card possessed space of a whole page effect and effect finally presented on reader in manufacturing process is completely the same.Due in reader
In it is identical with the typesetting processing method that is used in making apparatus, therefore, e-book is carried out in the present embodiment only in a manner of selecting one
The explanation of typesetting processing procedure.
Specifically, processing unit needs first when receiving the e-book typesetting instruction for making side or reading side initiation
The screen size information for the user terminal for showing the e-book is obtained, the user terminal for example can be smart mobile phone, flat board
Computer, PC etc., different user terminals have different screen sizes.Obtaining the screen size information of the user terminal
Afterwards, using the screen size information as reference frame, typesetting processing is carried out to the various data elements in e-book, so as to obtain
The eBook content being adapted with the user terminal screen size.Wherein, the data element in e-book is broadly divided into two classes, i.e.,
Paragraph text element and non-paragraph text element, rather than paragraph text element mainly include form, picture, formula etc..Namely
Say, the data element in the present embodiment, be to consider using the element of a certain type as an entirety, rather than lead in the prior art
Often data element is described with point, line, surface, for example for a form, is with each in form in the prior art
The position of bar line, cross reference are come what is described, and this description often causes relatively low treatment effect in typesetting, and the space of a whole page is imitated
Fruit is also poor.And consider in the present embodiment using each data element in e-book as an entirety, it is big with user terminal screen
According to small, typesetting processing is carried out to each data element, so that e-book is adapted with user terminal screen size, and also had
Beneficial to raising typesetting treatment effeciency.
In the present embodiment, need the user for showing the e-book whole by being obtained in the e-book typesetting instruction received
The screen size information at end, to allow to carry out typesetting processing to each data element in e-book according to the screen size information,
So as to obtain with the screen size of user terminal be adapted eBook content, so as to overcome in the prior art e-book not
During with being shown in the terminal of size, display content can not meet the defects of the needs of user often.
Fig. 2 is the flow chart of e-book processing method embodiment two provided by the invention, as shown in Fig. 2 this method includes:
Step 201, the e-book typesetting instruction that e-book keeper sends is received, and from e-book typesetting instruction
Obtain the screen size information for the user terminal for needing to show the e-book;
In the present embodiment, said by taking the e-book typesetting instruction that processing unit receives the initiation of e-book making apparatus as an example
Bright, specifically, processing unit receives the e-book typesetting instruction that e-book keeper sends, and acquisition needs are aobvious from the instruction
Show the screen size information of the user terminal of the e-book.In actual applications, can be user by its terminal device to
E-book making apparatus initiates e-book and obtains request, and includes the screen size information of the user terminal in the request, makes
The screen size information of user terminal, and then electronics can be known in the request that making apparatus receives by obtaining e-book keeper
Book keeper sends the e-book typesetting instruction for carrying the user terminal screen size information to processing unit, so that processing fills
The screen size information for the user terminal for needing to show the e-book can be obtained from typesetting instruction by putting.In addition, the use
The screen size information of family terminal can also be that making apparatus is known previously according to the various terminal equipment type statistics in market
, in order to ensure that the e-book made can be shown on the user terminal of different screen size, when making e-book, electronics
Book keeper can send the e-book typesetting instruction for carrying target terminal user screen size information to processing unit, so that
The processing unit gets the screen size information.
Further, step 201 can also be substituted by following step:
The e-book typesetting instruction that the user of user terminal sends is received, and institute is obtained in the information to be prestored from the user
State the screen size information of user terminal.
In the present embodiment, processing unit is in preset access customer terminal, and the user is previously stored with user terminal
The screen size information of terminal, for example it is stored with the property file of user terminal the screen size information of the terminal.Specifically
Ground, the processing unit is after the e-book typesetting instruction of user's transmission is received, from the information to prestore(Such as terminal attribute file)
The middle screen size information for obtaining the user terminal.
Step 202, one layout region corresponding with the screen size information is determined, the one layout region includes column number and column
It is wide;
Step 203, the typesetting format for determining each data element in e-book corresponding with the one layout region, the typesetting
Form describes using the one layout region as reference;
Step 204, according to the typesetting format each data element in the e-book is carried out in the one layout region
Typesetting is handled.
It is configured with the present embodiment, in processing unit to the type-setting document needed for e-book progress typesetting, the type-setting document
In define need during e-book typesetting in accordance with processing standard.It should be noted that the typesetting described in the present embodiment
File is to the existing type-setting document with streaming layout capacity(Such as upright book version sample file standard, Microsoft
OOXML file standards)Extension, extend wherein using the screen size of different user terminals as e-book typesetting handle weight
Want the processing standard of constrained parameters.Wherein, e-book one layout region is described in the type-setting document to establish rules really then and to electronics
Typesetting format required for each data element carries out typesetting in book is established rules then really.Carried out based on existing streaming type-setting document
Extension, without developing new type-setting document again, development difficulty is greatly reduced, personnel cost is saved, with existing streaming
Possessed by type-setting document while advantage, good space of a whole page effect is also provided with.
Specifically, when processing unit obtains the screen size information of user terminal from the e-book typesetting instruction received
Afterwards, one layout region corresponding with the screen size information is determined in type-setting document, wherein, the one layout region includes column number and column
It is wide.For example, when if the screen size of user terminal is first size, in one layout region be only a column, and column it is wide be less than or
Equal to the first size;If the screen size of user terminal is the second size, it is assumed that second size is more than first size, then arranges
Version is uniformly divided into two columns in region, the wide half less than or equal to second size in column per column.In the present embodiment, one layout region
In addition to wide except column number and column, the information such as line space width can also be included.
After one layout region corresponding with user terminal screen size information is determined, need further exist for determining and the row
The typesetting format of each data element in e-book corresponding to version region, the typesetting format are using the one layout region as with reference to next
Description.
Specifically, if the data element in e-book is paragraph text element, the determination is corresponding with one layout region
The typesetting format of each data element in e-book, the typesetting format describe using the one layout region as reference, including:
It is wide according to the column, it is determined that inserting the insertion position of newline and the paragraph word in the paragraph word
Duan Shouwei is put, and the insertion position and section first place are put to be described with a width of reference units in the column.In the present embodiment, to section
The element for falling word class carries out insertion position and the determination put of section first place that typesetting mainly includes determining newline, and the insertion position
Put to put with section first place and be described with a width of reference units in the column, for example section first place is setting in 1/6 column Kuan Chu, newline insertion
Position is located at column Kuan Chu.By using this relative describing mode, it is enterprising in different user terminals to be advantageous to eBook content
During row display, there is consistent space of a whole page effect.
What deserves to be explained is in the present embodiment, except the section first place to paragraph word is put and the determination of newline insertion position
Outside, the processing regulation to font size etc. can also be included, the regulation of the font size etc. with similar in the prior art,
Repeat no more.
After the typesetting format of each data element during e-book corresponding with one layout region is determined, it is necessary to according to the row
Version form carries out typesetting processing to each data element in the e-book in the one layout region, specifically, for paragraph text
Character table, the typesetting processing procedure include:
Described section of first place is positioned in the current subfield region of the one layout region to put;
Newline is inserted at the insertion position, so that the paragraph word is moved certainly when reaching the insertion position
OK.
Further, if the data element in e-book is non-paragraph text element, the determination and the typesetting area
The typesetting format of each data element in e-book corresponding to domain, the typesetting format are using the one layout region as with reference to describing
, including:
It is wide according to the column, determine area size and original position shared by the non-paragraph text element, the region is big
Small and original position is described with a width of reference units in the column.For example, in fixed position in e-book(3cm,
13cm)One fixed size at place(10cm×10cm)Picture when carrying out typesetting processing, retouched with column a width of reference units
State its shared area size and original position, such as shared area size be 3/4 column it is wide × 3/4 column is wide, original position is located at coordinate
For(1/6 column is wide, and 1/2 column is wide)Place.
Correspondingly, according to the typesetting format to the non-paragraph text element in the e-book in the one layout region
Typesetting processing is carried out, including:
The original position is positioned in the current subfield region of the one layout region;
The non-paragraph text element is zoomed in and out using the original position as origin, so that the non-paragraph word member
Plain occupied area size is the area size.
In the present embodiment, the typesetting format is described with any Format Type in following Format Type:Script lattice
Formula, XML format, binary format, html format.
What deserves to be explained is it the above is only big according to user terminal screen to paragraph document element and non-paragraph document element
Small information carries out the process of self-adaption typesetting processing, includes but is not limited to insert the newline of paragraph document element in type-setting document
Enter position, section first place is put and non-paragraph element original position, shared area size typesetting format description, can also basis
The description for including the typesetting format such as other words and picture Overlay is actually needed, is not limited with the present embodiment.
In addition, what deserves to be explained is, during e-book making apparatus carries out typesetting processing to e-book, e-book
Making apparatus can also receive the adjust instruction that e-book keeper issues, to be adjusted control to e-book typesetting process.
For example when keeper has found that the space of a whole page effect of typesetting is undesirable in the display interface of making apparatus, the row of modification can be passed through
Related typesetting processing parameter in version file, such as one layout region, typesetting format and suitable terminal screen size information are come
To readjusting typesetting processing procedure.Then, should if a certain subscriber terminal equipment is to the making apparatus acquisition request e-book
Identical typesetting engine, i.e. user terminal used by being needed in subscriber terminal equipment with typesetting final with making apparatus processing
Equipment needs to get the typesetting engine that making apparatus finally uses in advance, correctly to be solved to the e-book got
Analysis is presented.That is, the subscriber terminal equipment as reader only needs to complete the process that parsing is presented, without entering to e-book
Typesetting adjusts row again.
In the present embodiment, corresponding one layout region is determined according to the screen size information of the user terminal of acquisition, and
Describe to carry out each data element in e-book the typesetting format used in typesetting using the one layout region as reference, be not only able to
To the eBook content being adapted with the screen size of user terminal, additionally it is possible to pass through the typesetting format relative to one layout region
Description so that each data element all has preferable space of a whole page effect in different user terminals in e-book.
Fig. 3 is the schematic diagram of e-book processing unit embodiment one provided by the invention, as shown in figure 3, the device includes:
Receiving module 11, for receiving e-book typesetting instruction, acquisition needs to show the user terminal of the e-book
Screen size information;
Processing module 12, for according to the screen size information, typesetting to be carried out to each data element in the e-book
Processing, obtain the eBook content being adapted with the screen size of the user terminal
The device of the present embodiment can be used for the technical scheme for performing embodiment of the method shown in Fig. 1, its realization principle and skill
Art effect is similar, and here is omitted.
Fig. 4 is the schematic diagram of e-book processing unit embodiment two provided by the invention, as shown in figure 4, the device is in Fig. 3
On the basis of illustrated embodiment, the receiving module 11 is specifically used for:
Receive the e-book typesetting instruction that e-book keeper sends;
The screen size information for the user terminal for needing to show the e-book is obtained from e-book typesetting instruction;
Or
Receive the e-book typesetting instruction that the user of user terminal sends;
The screen size information of the user terminal is obtained in the information to be prestored from the user.
Further, the processing module 12 includes:
First determining unit 121, for determining one layout region corresponding with the screen size information, the one layout region
It is wide including column number and column;
Second determining unit 122, for determining the typesetting of each data element in e-book corresponding with the one layout region
Form, the typesetting format describe using the one layout region as reference;
Processing unit 123, for according to the typesetting format to each data element in the e-book in the typesetting area
Typesetting processing is carried out in domain.
Further, if the data element is paragraph text element, second determining unit 122 is specifically used for:
It is wide according to the column, it is determined that inserting the insertion position of newline and the paragraph word in the paragraph word
Duan Shouwei is put, and the insertion position and section first place are put to be described with a width of reference units in the column;
Correspondingly, the processing unit 123 is specifically used for:
Described section of first place is positioned in the current subfield region of the one layout region to put;
Newline is inserted at the insertion position, so that the paragraph word is moved certainly when reaching the insertion position
OK.
If the data element is non-paragraph text element, second determining unit 122 is specifically used for:
It is wide according to the column, determine area size and original position shared by the non-paragraph text element, the region is big
Small and original position is described with a width of reference units in the column;
Correspondingly, the processing unit 123 is specifically used for:
The original position is positioned in the current subfield region of the one layout region;
The non-paragraph text element is zoomed in and out using the original position as origin, so that the non-paragraph word member
Plain occupied area size is the area size.
Further, the typesetting format is described with any Format Type in following Format Type:
Script format, XML format, binary format, html format.
The device of the present embodiment can be used for the technical scheme for performing embodiment of the method shown in Fig. 2, its realization principle and skill
Art effect is similar, and here is omitted.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program
Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.