CN101364216B - Method and device for displaying electronic book documentary on mobile terminal - Google Patents

Method and device for displaying electronic book documentary on mobile terminal Download PDF

Info

Publication number
CN101364216B
CN101364216B CN2008102163239A CN200810216323A CN101364216B CN 101364216 B CN101364216 B CN 101364216B CN 2008102163239 A CN2008102163239 A CN 2008102163239A CN 200810216323 A CN200810216323 A CN 200810216323A CN 101364216 B CN101364216 B CN 101364216B
Authority
CN
China
Prior art keywords
file data
electronic book
file
book documentary
data
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.)
Expired - Fee Related
Application number
CN2008102163239A
Other languages
Chinese (zh)
Other versions
CN101364216A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008102163239A priority Critical patent/CN101364216B/en
Publication of CN101364216A publication Critical patent/CN101364216A/en
Application granted granted Critical
Publication of CN101364216B publication Critical patent/CN101364216B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a method and a device for displaying files in an electronic book on a mobile terminal. The method comprises the steps of obtaining file data by adopting a corresponding acquiring method according to the file types of the files in the electronic book; judging whether the file data is test data in a non Unicode coded format, if the file data is the test data, entering the last step after the coded format thereof is converted to a Unicode coded format, and if the file data is not the test data, directly entering the last step; and displaying the file data by a displaying interface of the mobile terminal. The device comprises a file data obtaining module, a coded format converting module and a file data displaying module. By adopting the device, the file data is obtained by adopting the corresponding acquiring method according to the file types of the files in the electronic book, thereby realizing the display of the files of the electronic book with various formats on the mobile terminal with limited resources; and meanwhile, bookmark information is recorded in bookmark files corresponding to the files of the electronic book, so as to realize the independent management of the bookmark information in the files of the electronic book.

Description

A kind of method and device that on portable terminal, shows electronic book documentary
Technical field
The present invention relates to a kind of method and device that shows electronic book documentary, relate in particular to a kind of method and device that on portable terminal, shows electronic book documentary.
Background technology
Arrival Internet era of information-based has brought the e-sourcing of many emerging, diversification to people.The rise of electronic publication makes the paper reading method that spread thousands of years be faced with the impact of new publication idea.The e-book that has comprised literal, figure, image is a representative of emerging electronic publication.
At present, provide the electronic book documentary Presentation Function, make the user after the basic function of using portable terminal, can read various e-book, brought facility to the user as portable terminals such as mobile phones.At application number is 200610025966.6, name is called in the Chinese patent application of " method and apparatus that shows e-book on mobile phone ", a kind of method and apparatus that shows e-book on mobile phone is disclosed, on mobile phone, show e-book by described equipment, each electronic book documentary data that only read and show regular length have realized the demonstration of big text electronic book documentary (more than the 10MB); In addition, this application is recorded in the end of electronic book documentary with bookmark information, is convenient to the management to bookmark information.But the technical scheme of this patented claim has the following disadvantages:
1, this application is only supported the demonstration of the electronic book documentary of text formatting, as showing pdb (Palm Database, the simple binary file of a kind of form in the Palm mobile phone operating system), html (Hypertext Markup Language, HTML) electronic book documentary of complex format such as, need in mobile phone, to install in addition corresponding display device, thereby cause the serious waste of mobile phone resources, and brought inconvenience for user's use;
2, this application is directly inserted bookmark information at the electronic book documentary end, make bookmark and electronic book documentary direct correlation, this mode only is applicable to the management to the bookmark information of the very simple text electron-like written matter of forms such as txt, and for the electronic book documentary of other form complexity, because interior data is organized by distinctive data structure, may also comprise fileinfos such as checking data, therefore, add bookmark information at the electronic book documentary end and can damage electronic book documentary.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method and device that shows electronic book documentary on portable terminal, has realized the demonstration of the electronic book documentary of multiple form on portable terminal.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of method that shows electronic book documentary on portable terminal may further comprise the steps:
A, adopt corresponding acquisition methods to obtain file data according to the file type of electronic book documentary;
B, judge whether described file data is the text data of non-Unicode coded format, if, enter step c after its coded format is converted to the Unicode coded format, otherwise, step c directly entered;
C, show described file data at the display interface of portable terminal.
In the such scheme, corresponding acquisition methods is meant described in the step a, when described electronic book documentary is text, directly reads the file data of preset length and realizes obtaining described file data.
In the such scheme, corresponding acquisition methods is meant described in the step a, when described electronic book documentary is the pdb file, adopts the acquisition methods that may further comprise the steps to obtain file data:
A11, read the file data of preset length;
A12, described file data decompresses.
In the such scheme, corresponding acquisition methods is meant described in the step a, when described electronic book documentary is the html file, adopts the acquisition methods that may further comprise the steps to obtain file data:
A21, a pair of hypertext sign of identification;
A22, determine the attribute of the file data of its guiding according to described hypertext sign;
A23, read the file data of described hypertext sign guiding.
In the such scheme, described step c may further comprise the steps:
C1, judge whether described file data has attribute, if, according to its attribute it is carried out special effect processing, otherwise, next step directly entered;
C2, according to the size of described display interface, described file data is set type;
C3, according to the composing result, draw described file data at described display interface.
In the such scheme, after the described step c,, then get back to described step a if need to continue to show electronic book documentary, otherwise, bookmark information is recorded in the bookmark file of described electronic book documentary correspondence.
In the such scheme, obtain before the file data for the first time, further comprising the steps of:
(1), reads the file header information of described electronic book documentary;
(2), when determining that according to described file header information described electronic book documentary is the file of its filename suffix institute markup document type, enter described step a.
A kind of device that shows electronic book documentary on portable terminal comprises:
The file data acquisition module is used for adopting corresponding acquisition methods to obtain file data according to the file type of electronic book documentary;
The coded format modular converter is used for when the file data that described file data acquisition module obtains is the text data of non-Unicode coded format its coded format being converted to the Unicode coded format;
The file data display module is used for file data that display interface at portable terminal shows that described file data acquisition module obtains or via the file data behind the described coded format modular converter transform coding form.
In the such scheme, described file data acquisition module further comprises file type identification module, text data acquisition module, pdb file data acquisition module and html file data acquisition module; Whether the file type that described file type identification module is used to discern described electronic book documentary is consistent with the file type that the filename suffix of this electronic book documentary is indicated; It is under the situation of text that described text data acquisition module is used at described electronic book documentary, directly reads the file data of preset length; It is under the situation of pdb file that described pdb file data acquisition module is used at described electronic book documentary, obtains the file data of preset length and the described file data that decompresses; It is under the situation of html file that described html file data acquisition module is used at described electronic book documentary, obtains the file data by the guiding of a pair of hypertext sign.
In the such scheme, described device also comprises the bookmark administration module, and the bookmark information that is used for described electronic book documentary is recorded in corresponding bookmark file, and to described bookmark file add, modification, deletion action.
Beneficial effect of the present invention mainly shows: method provided by the invention can realize by device provided by the invention, its file type according to electronic book documentary adopts corresponding acquisition methods to obtain file data, thereby has realized the demonstration to the electronic book documentary of multiple form on resource-constrained portable terminal; Simultaneously by independently, the bookmark file corresponding with electronic book documentary write down bookmark information, realized managing independently the bookmark information of electronic book documentary.
Description of drawings
Fig. 1 shows the process flow diagram of electronic book documentary on portable terminal for the present invention;
Fig. 2 shows the apparatus structure synoptic diagram of electronic book documentary on portable terminal for the present invention.
Embodiment
The invention will be further described below in conjunction with accompanying drawing.
With reference to Fig. 1, a kind of method that shows electronic book documentary on portable terminal is applicable to Qto pia, GTK, software platforms such as WinCE/Windows Mobile, Symbian, may further comprise the steps:
S101: the file header information that reads electronic book documentary;
S102: judge according to file header information whether electronic book documentary is the file of its filename suffix institute markup document type, if, enter S103, otherwise, S112 entered;
S103: the file type according to electronic book documentary adopts corresponding acquisition methods to obtain file data; Such as:
When electronic book documentary is text, directly read the file data of preset length; If there is bookmark file, the position that then jumps to the bookmark information representative of its record begins to read the file data of preset length, otherwise the file data after file header information begins to read the file data of preset length; The file data that herein obtains is a text data;
When electronic book documentary is the pdb file, adopt the acquisition methods that may further comprise the steps to obtain file data:
1, reads the file data of preset length; If there is bookmark file, the position that then jumps to the bookmark information representative of its record begins to read the file data of preset length, otherwise the file data after file header information begins to read the file data of preset length;
2, decompression this document data; The file data that herein obtains is a text data;
When electronic book documentary is the html file, adopt the acquisition methods that may further comprise the steps to obtain file data:
1, a pair of hypertext sign of identification; If there is bookmark file, the position that then jumps to the bookmark information representative of its record begins to carry out the identification of hypertext sign, otherwise the file data after file header information begins to carry out the identification of hypertext sign;
2, determine the attribute of the file data of its guiding according to this hypertext sign; When file data was text data, the attribute of file data was meant features such as the size of font, color, background colour; When file data was graphic image data, the attribute of file data was meant features such as the rotation of graph image, convergent-divergent; 3, read the file data of this hypertext sign guiding;
The file data that herein obtains is text data or graphic image data, and when the file data that obtains was graphic image data, its data layout should be converted to the data layout that the mobile terminal software platform is supported;
Electronic book documentary also may be other file type, only needs to adopt corresponding acquisition methods to obtain file data according to its data structure and gets final product, repeat no more herein;
S104: judge whether file data is the text data of non-Unicode coded format, if, enter S105, otherwise, S106 directly entered;
S105: the coded format of text data is converted to the Unicode coded format;
S106: judge whether file data has attribute, if, enter S107, otherwise, S108 directly entered;
S107: the attribute according to file data carries out special effect processing to it;
When file data is text data, can set size, color, the background colour of its font, add boldface type etc. according to its attribute; The function of the size that sets font, overstriking, inclination is provided such as the QFont class of Qtopia platform;
When file data is graphic image data, according to its attribute can be rotated it, operation such as convergent-divergent; The mapping function of 2D coordinate system is provided such as the QWMatrix class of Qtopia platform;
S108:, the file data that obtains is set type according to the size of the display interface of portable terminal; Provide the computing function of character duration, height Pixel Dimensions such as the QfontMetrics class of Qtopia platform, can be used for realizing line feed, paging etc. file data;
S109:, draw this document data at the display interface of portable terminal according to the composing result; The function of powerful rendering text, figure, image is provided such as the QPainter class of Qtopia platform;
S110: judge whether display file data once more, if, then get back to S103, otherwise, S111 entered;
S111: bookmark information is recorded in the bookmark file of electronic book documentary correspondence, and process ends;
S112: prompting error message, and process ends.
With reference to Fig. 2, a kind of device that shows electronic book documentary on portable terminal comprises:
File data acquisition module 20 is used for adopting corresponding acquisition methods to obtain file data according to the file type of electronic book documentary;
The file data acquisition module further comprises file type identification module 201, text data acquisition module 202, pdb file data acquisition module 203 and html file data acquisition module 204, and can add corresponding file data acquisition module according to user's needs; Wherein,
File type identification module 201, whether the file type that is used to discern electronic book documentary is consistent with the file type that the filename suffix of this electronic book documentary is indicated;
Text data acquisition module 202 is used for directly reading the file data of preset length when electronic book documentary is text;
Pdb file data acquisition module 203 is used for when electronic book documentary is the pdb file, obtains the file data of preset length and this document data that decompress;
Html file data acquisition module 204 is used for when electronic book documentary is the html file, obtain by the guiding of a pair of hypertext sign file data;
Coded format modular converter 21 when the file data that is used for obtaining at file data acquisition module 20 is the text data of non-Unicode coded format, is converted to the Unicode coded format with its coded format;
File data display module 22 is used for file data that the display interface display file data acquisition module 20 at portable terminal obtains or via the file data of coded format modular converter 21 transform coding forms;
Bookmark administration module 23, the bookmark information that is used for electronic book documentary is recorded in corresponding bookmark file, and to interpolation, modification, the deletion action of bookmark file, has realized the control of user to the bookmark management.
The above is embodiments of the invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.

Claims (4)

1. a method that shows electronic book documentary on portable terminal is characterized in that, may further comprise the steps:
A, adopt corresponding acquisition methods to obtain file data according to the file type of electronic book documentary; Described electronic book documentary comprises the electronic book documentary of multiple form;
B, judge whether described file data is the text data of non-Unicode coded format, if, enter step c after its coded format is converted to the Unicode coded format, otherwise, step c directly entered;
C, show described file data at the display interface of portable terminal;
Corresponding acquisition methods is meant described in the step a,
When described electronic book documentary is text, directly reads the file data of preset length and realize obtaining described file data;
When described electronic book documentary is the pdb file, adopt the acquisition methods that may further comprise the steps to obtain file data:
A11, read the file data of preset length;
A12, described file data decompresses;
When described electronic book documentary is the html file, adopt the acquisition methods that may further comprise the steps to obtain file data:
A21, a pair of hypertext sign of identification;
A22, determine the attribute of the file data of its guiding according to described hypertext sign;
A23, read the file data of described hypertext sign guiding;
After the described step c,, then get back to described step a if need to continue to show electronic book documentary, otherwise, bookmark information is recorded in the bookmark file of described electronic book documentary correspondence.
2. the method that shows electronic book documentary on portable terminal as claimed in claim 1 is characterized in that described step c may further comprise the steps:
C1, judge whether described file data has attribute, if, according to its attribute it is carried out special effect processing, otherwise, c2 directly entered;
C2, according to the size of described display interface, described file data is set type;
C3, according to the composing result, draw described file data at described display interface.
3. the method that shows electronic book documentary on portable terminal as claimed in claim 1 is characterized in that, obtains before the file data for the first time, and is further comprising the steps of:
(1), reads the file header information of described electronic book documentary;
(2), when the file type that indicated of the file type and the filename suffix of this electronic book documentary of determining described electronic book documentary according to described file header information is consistent, enter described step a.
4. a device that shows electronic book documentary on portable terminal is characterized in that, comprising:
The file data acquisition module is used for adopting corresponding acquisition methods to obtain file data according to the file type of electronic book documentary; Described electronic book documentary comprises the electronic book documentary of multiple form;
The coded format modular converter is used for when the file data that described file data acquisition module obtains is the text data of non-Unicode coded format its coded format being converted to the Unicode coded format;
The file data display module is used for file data that display interface at portable terminal shows that described file data acquisition module obtains or via the file data behind the described coded format modular converter transform coding form;
Described file data acquisition module further comprises file type identification module, text data acquisition module, pdb file data acquisition module and html file data acquisition module;
Whether the file type that described file type identification module is used to discern described electronic book documentary is consistent with the file type that the filename suffix of this electronic book documentary is indicated;
It is under the situation of text that described text data acquisition module is used at described electronic book documentary, directly reads the file data of preset length;
It is under the situation of pdb file that described pdb file data acquisition module is used at described electronic book documentary, obtains the file data of preset length and the described file data that decompresses;
It is under the situation of html file that described html file data acquisition module is used at described electronic book documentary, obtains the file data by the guiding of a pair of hypertext sign;
Described device also comprises the bookmark administration module, and the bookmark information that is used for described electronic book documentary is recorded in corresponding bookmark file, and to described bookmark file add, modification, deletion action.
CN2008102163239A 2008-09-22 2008-09-22 Method and device for displaying electronic book documentary on mobile terminal Expired - Fee Related CN101364216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102163239A CN101364216B (en) 2008-09-22 2008-09-22 Method and device for displaying electronic book documentary on mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102163239A CN101364216B (en) 2008-09-22 2008-09-22 Method and device for displaying electronic book documentary on mobile terminal

Publications (2)

Publication Number Publication Date
CN101364216A CN101364216A (en) 2009-02-11
CN101364216B true CN101364216B (en) 2011-05-11

Family

ID=40390587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102163239A Expired - Fee Related CN101364216B (en) 2008-09-22 2008-09-22 Method and device for displaying electronic book documentary on mobile terminal

Country Status (1)

Country Link
CN (1) CN101364216B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101702149B (en) * 2009-11-12 2012-07-18 深圳市五巨科技有限公司 Method for displaying electronic book with movable terminal and device thereof
US8903783B2 (en) * 2010-04-23 2014-12-02 Bridgepoint Education System and method for publishing and displaying digital materials
CN101888505A (en) * 2010-06-13 2010-11-17 杭州海康威视数字技术股份有限公司 Method and device for displaying characters on screen
CN102314413A (en) * 2010-07-06 2012-01-11 上海闻泰电子科技有限公司 Electronic-book skipping and positioning method for mobile terminal
CN102004779B (en) * 2010-11-19 2012-11-28 百度在线网络技术(北京)有限公司 Document sharing platform and document processing method
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
CN102012894B (en) * 2010-11-19 2012-10-10 百度在线网络技术(北京)有限公司 Method and system for displaying documents by terminals
CN102081600B (en) * 2011-01-25 2012-10-10 珠海全志科技股份有限公司 E-book typesetting method and e-book typesetting system
CN103970799B (en) * 2013-02-04 2019-04-26 百度在线网络技术(北京)有限公司 A kind of generation method of electronic document, device and client
CN104216868B (en) * 2014-09-10 2019-02-01 武汉钢铁(集团)公司 A kind of adaptation method and device of document display format
CN104462031A (en) * 2014-11-06 2015-03-25 国云科技股份有限公司 Method for achieving batch processing of garbled documents quickly

Also Published As

Publication number Publication date
CN101364216A (en) 2009-02-11

Similar Documents

Publication Publication Date Title
CN101364216B (en) Method and device for displaying electronic book documentary on mobile terminal
CN101441713B (en) Optical character recognition method and apparatus of PDF document
CN100363883C (en) Printer with a web server embedded therein and printing method thereof
CN100550007C (en) Analytic system and method based on a plurality of files of key element
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
RU2009109687A (en) LOGOKONI - ADVERTISING PRODUCT FOR BRAND ADVERTISERS
CN101699426A (en) Document format conversion system and method
CN101996160A (en) Method and system for processing script data
CN109933751B (en) Image-text drawing method and device, computer-readable storage medium and computer equipment
CN101281444A (en) Message recording method, system as well as mobile communication terminal
CN113515928A (en) Electronic text generation method, device, equipment and medium
CN103136453A (en) Automatic test paper formation method and automatic scoring method of document manipulation subjects
CN105389294A (en) Method and apparatus for reading document
CN113515221A (en) Picture and character comparison display method and device based on electronic document
CN104077323A (en) Method and device for converting web page content to multimedia messages
US20060045345A1 (en) Method for inputting and permuting original scripts to external mobile phone and the device for performing the same
CN104216868A (en) Adaptation method and device for document display format
US20090233648A1 (en) Device for controlling display of mobile terminal and method thereof
CN110516125B (en) Method, device and equipment for identifying abnormal character string and readable storage medium
CN112433995A (en) File format conversion method, system, computer equipment and storage medium
CN102467490B (en) Font data processing method and device
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN113297425B (en) Document conversion method, device, server and storage medium
CN101702149B (en) Method for displaying electronic book with movable terminal and device thereof
CN103455808A (en) Sending device of machine character reading code and coding method

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110511

Termination date: 20160922