CN103049430A - Page display method based on IDF (interactive document format) files - Google Patents

Page display method based on IDF (interactive document format) files Download PDF

Info

Publication number
CN103049430A
CN103049430A CN2012105819142A CN201210581914A CN103049430A CN 103049430 A CN103049430 A CN 103049430A CN 2012105819142 A CN2012105819142 A CN 2012105819142A CN 201210581914 A CN201210581914 A CN 201210581914A CN 103049430 A CN103049430 A CN 103049430A
Authority
CN
China
Prior art keywords
idf
screen
page
file
method based
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.)
Pending
Application number
CN2012105819142A
Other languages
Chinese (zh)
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.)
NANJING XINYULI CULTURE SPREAD CO Ltd
Original Assignee
NANJING XINYULI CULTURE SPREAD 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 NANJING XINYULI CULTURE SPREAD CO Ltd filed Critical NANJING XINYULI CULTURE SPREAD CO Ltd
Priority to CN2012105819142A priority Critical patent/CN103049430A/en
Publication of CN103049430A publication Critical patent/CN103049430A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a page display method based on IDF (interactive document format) files. The method includes: acquiring IDF files; analyzing specific page data in IDF files; acquiring device screen data, and calculating screen parameters according to screen data; calculating actual display parameters on a device according to set display areas in IDF files; and loading the display areas required to be displayed. Documents can be displayed with designed proportion according to different physical size and resolution by the method which supports all hardware device, with an Android system, of different size and resolution, user experience is improved, and better compatibility between documents and hardware platform systems is achieved.

Description

A kind of page display method based on the IDF formatted file
Technical field
The present invention relates to the Computer Applied Technology field, particularly a kind of page display method based on the IDF formatted file.
Background technology
Along with the day by day raising of people's living standard, the parent that the entertainment way such as video display animation more and more are subject to consumers in general looks at.Along with the arrival of information age, Digital Media arises at the historic moment, and Digital Media is as the media that exist and propagate with digital form, the every aspect in being widely used in living, broadcasting, TV, internet, mobile phone, computer, PDA.Under these circumstances, Media Industry developed into a new high point, how digital times, the problem of most critical are transmission information between various digitizers, how to realize compatibility.
The information that is used for propagation and reads, its form comprises literal, numerical value, language, music, image, form etc., traditional word processing process comprises: writing, editor, composing, printing, hair style five steps, and the text-processing process of modern multimedia equipment comprises: the e-text-text-processing (text-processing software) of text preparation (input of literal and icon)-e-text-text editing and composing (text editor)-format-text storage represents (text file reader) in transmission-text.
Traditional file structure all is take the page<page〉show and set type as unit, file structure such as forms such as PDF, DOC, PDF document format for example, this file layout is general in operating system, so that become the desirable document format that carries out electronic document distribution and digital information propagation at Internet.Increasing e-book, the description of product, company's proclamation, network data, Email are brought into use the PDF file.The PDF file has become the actual industrial standard of digital information at present.Although the PDF file has so many advantage, it still has some incompatibility in the use between the hardware platform, on some hardware platform, still can not use.
Still do not have for the unified standard of Digital Media document norm-setting, so that general in whole field of digital media in the industry at present.The digital document form of each fatware manufacturer exploitation only limits to the processing (comprising PDF) to picture, literal, does not pay attention to distinctive function of digital Age, as: the characteristics such as interaction, user's experience.
IDF:Interactive Document Format, the interactive document format, this is a kind of can be on various hardware platforms compatible document format that uses.But for the hardware device that carries the Android system, because screen physical size, the resolution of these hardware devices are different, and of a great variety, on the hardware that is equipped with the Android system, the file of IDF form is when showing, distortion can appear in the subregion, for example, picture is elongated and causes the original shape that can't Show Picture, well the content in the display file.
Summary of the invention
The defective that exists in order to overcome above-mentioned prior art the invention provides a kind of page display method based on the IDF formatted file, can normally show on the hardware platform of Android system so that the file of IDF form carries, and avoids distortion.
To achieve these goals, technical scheme of the present invention is as follows:
A kind of page display method based on the IDF formatted file is characterized in that, comprises the steps:
1) obtains the IDF file;
2) resolve concrete page data in the IDF file;
3) obtain the device screen data, calculate screen parameter according to on-screen data;
4) according to the actual displayed parameter of viewing area calculating on this equipment that arranges in the IDF file;
5) load the viewing area that needs demonstration.
As preferably, step 2 of the present invention) page data comprises that pixel is high and pixel is wide.
As preferably, step 3) on-screen data of the present invention comprises screen pixels height, screen pixels width and status bar pixels tall.
As preferably, step 3) of the present invention is according to waiting ratio convergent-divergent algorithm to calculate high wide final ratio, the final size of device display area and high width global offset amount.
As preferably, step 4) of the present invention according to wait ratio convergent-divergent algorithm calculate the viewing area actual displayed position, size, with rightmargin and the bottom margin of on-screen display (osd) area.
The invention has the beneficial effects as follows, can be according to different physical sizes, the screen of different resolution is in the ratio display document of design, support the hardware device of the lift-launch Android system of present all different sizes and resolution, improve the user and experience, realize the compatibility of better file and hardware platform system.
Description of drawings
Fig. 1 is block diagram of the present invention.
Embodiment:
Be easy to understand understanding in order to make creation characteristic of the present invention, technological means and to reach purpose, further set forth the present invention below in conjunction with specific embodiment.
But the IDF document is a kind of interactive digital document format, the document label that comprises NXML language definition, but the document label comprises viewable area label, external image label, external video label, external audio label, webpage label, text label interaction sequence figure label, lantern slide label, mutual static resource label.Viewable area label<region 〉, the materials such as concrete literal, picture all are with zone<region in the page form be presented on the page;
External image label<image 〉, be used for memory disk epigraph address and relevant information;
External video label<video 〉, be used for video address and relevant information on the memory disk;
External audio label<audio 〉, be used for audio frequency address and relevant information on the memory disk;
Webpage label<embeded 〉, be used for web page address and relevant information on memory disk or the internet;
Text label<text 〉, the content and the relevant information that are used for storing text;
But interaction sequence figure label<GSF 〉, be used for a picture group sheet is play in order, and can manually control playing sequence;
Lantern slide label<Gallery 〉, define some at viewable area<region〉pattern and the parameter of the picture lantern slide that shows;
Mutual static resource label<ISR 〉, define the files such as some static images, video, make it have certain interaction characteristic, as: picture can be set as and can smear the wiping state.
The XML form of the data layout of IDF for adopting the NXML linguistic labels to make.
The IDF file structure is documentation root node, one-level child node, secondary child node and three grades of tree structures that child node forms, and wherein, the one-level child node is joint, and the secondary child node is the page, and three grades of child nodes are the document elements tabulation.Described joint comprises several pages and element index table, can reach farthest multiplexing in order to guarantee the element in the document format, and the generation that repeats of avoiding resource, and the IDF adopted value comes associated element to the mode of index.As follows such as the individual element index:
<key?value="page/1"location="xml/pages/1.xml"/>
Wherein, value represents type and the ID numbering of this element, also is the foundation that other element is accessed this element;
Location is content and the concrete storage address of attribute of element for this reason.
The element that the document elements tabulation comprises is viewing area, action, outside material, and the element in tabulating according to document elements is searched the element in the element index tabulation.
Action comprises presented event label, hiding event tag, moving event label, link event tag and broadcast event label.Wherein:
Presented event label<show 〉, be used for showing several viewable area<region 〉;
Hide event tag<hide 〉, be used for hiding several viewable area<region 〉;
Moving event label<move 〉, be used for mobile several viewable area<region 〉;
Link event tag<link 〉, be used for link external web page, application program, mail etc.;
Broadcast event label<play 〉, be used for playing several resource<resource 〉;
Outside material comprises picture, video, audio frequency, webpage.
A kind of page display method based on the IDF formatted file is characterized in that, comprises the steps:
Step 1): obtain the IDF file;
Resolve concrete page data in the IDF file, obtain pixel high (PageHeight) and the pixel wide (PageWidth) of concrete some page settings according to the IDF form;
Obtain the device screen data, on-screen data comprises screen pixels height, screen pixels width and status bar pixels tall, and the final purpose that obtains these data is to allow the IDF file be presented in the middle of the screen according to a certain percentage.Calculate the value of relevant needs according to on-screen data, obtain device screen resolution, such as screen pixels height (ScreenHeight), screen pixels width (ScreenWidth), obtain device state bar pixels tall (StatusBarHeight), if full screen display, then this device state bar pixels tall value is 0; According to waiting ratio convergent-divergent algorithm to calculate high wide final ratio, the final size of device display area and high width global offset amount.According to wait ratio convergent-divergent algorithm calculate the viewing area actual displayed position, size, with rightmargin and the bottom margin of on-screen display (osd) area.
Big or small according to the actual displayed that calculate on this equipment the viewing area that arranges in the IDF file;
Viewing area field width=screen pixels is wide.
Need to be in the pixels tall of new screen display:
Viewing area height=screen pixels Gao – status bar pixel is high.
newScreenHeight=ScreenHeight-StatusBarHeight,
Obtain the ratio of height divided by the pixel height of page setting with new device screen height:
HeightScaling=newScreenHeight/PageHeight,
With the device screen width divided by the wide ratio that obtains width of the pixel of page setting:
WidthScaling=ScreenWidth/PageWidth,
Finally than row: the smaller value in the depth-width ratio.Than the ratio of height and the ratio of width, selecting wherein less one is final global proportionality (Scaling), if the ratio of height is less, the side-play amount that the height aspect then is set is 0(heightOffset=0), the side-play amount of width aspect is that the screen pixels width deducts wide 1/2nd of the final global proportionality that multiply by of page pixel: (widthOffset=(ScreenWidth-(PageWidth*Scaling))/2);
If instead the ratio of width aspect is less, the side-play amount that the width aspect then is set is 0(widthOffset=0), the side-play amount of height aspect is that new device screen pixels tall deducts page pixel height and multiply by 1/2nd of final global proportionality: height offset=(viewing area high-(the final ratio of the high * of page pixel))/2, namely
(heightOffset=(newScreenHeight-(PageHeight*Scaling))/2)。
Step 2):
Step 2.1: load the viewing area that needs demonstration.Particular location (x, y) and size (RegionWidth, RegionHeight) according to concrete some viewing areas (Region) in the IDF document format Rule page.
Step 2.2: the position (x of viewing area (Region), y) multiply by respectively the final global proportionality (Scaling) that calculates acquisition in the step 1), the side-play amount (widthOffset, heightOffset) that adds respectively again width and height aspect obtains new position:
(newX=(int)(x*scaling)+widthOffset,
newY=(int)(y*scaling)+heightOffset)。
Step 2.3: the size (RegionWidth, RegionHeight) of viewing area (Region) multiply by respectively in the step 1) to be calculated the final global proportionality (Scaling) that obtains and obtains new high wide:
Final viewing area height=viewing area height-height offset * 2;
The final viewing area width=viewing area field width-width talent in a certain field amount of moving * 2;
(new?RegionWidth=RegionWidth*scaling,
newRegionHeight=RegionHeight*scaling)。
The actual displayed position of Region:
The X coordinate: original X coordinate * is finally than row+width offset;
Y coordinate: the final ratio+height offset of original Y coordinate *;
The actual displayed size of Region:
High: original height * is finally than row;
Wide: the final ratio of original width *;
Rightmargin: final viewing area width-(the actual X coordinate of Region developed width+Region);
Bottom margin: final viewing area height-(the actual Y coordinate of Region true altitude+Region);
Step 2.4: screen pixels is high, wide to be deducted respectively the twice of calculating the height offset that obtains and width offset in the step 1) to obtain new screen pixels height wide according to calculate obtaining in the step 1):
(newScreenWidth=ScreenWidth-WidthOffset*2,
newScreenHeight=newScreenHeight-HeightOffset*2)。
Step 2.5: the screen pixels height that calculates according to step 2.4 deducts the y coordinate of Region and height sum and obtains this Region apart from the distance of bottom of screen:
(RegionBottom=newScreenHeight-(newRegionHeight+newY));
The screen pixels reductions that calculates according to step 2.4 goes the x coordinate of Region and width degree sum to obtain this Region apart from the distance of screen right hand edge:
(RegionRight=newScreenWidth-(newRegionWidth+newX))。
Step 2.6: utilize the setMargins () method of object of the RelativeLayout.LayoutParams class of Android system that the position of this Region on screen is set.
More than show and described ultimate principle of the present invention, principal character and advantage of the present invention.The technician of the industry should understand; the present invention is not restricted to the described embodiments; that describes in above-described embodiment and the instructions just illustrates principle of the present invention; the present invention also has various changes and modifications without departing from the spirit and scope of the present invention, and these changes and improvements all fall in the claimed scope of the invention.The claimed scope of the present invention is defined by appending claims and equivalent thereof.

Claims (5)

1. the page display method based on the IDF formatted file is characterized in that, comprises the steps:
1) obtains the IDF file;
2) resolve concrete page data in the IDF file;
3) obtain the device screen data, calculate screen parameter according to on-screen data;
4) according to the actual displayed parameter of viewing area calculating on this equipment that arranges in the IDF file;
5) load the viewing area that needs demonstration.
2. a kind of page display method based on the IDF formatted file according to claim 1 is characterized in that described step 2) page data comprise that pixel is high and pixel is wide.
3. a kind of page display method based on the IDF formatted file according to claim 1 is characterized in that, described step 3) on-screen data comprises screen pixels height, screen pixels width and status bar pixels tall.
4. according to claim 1 or 3 described a kind of page display methods based on the IDF formatted file, it is characterized in that described step 3) is according to waiting ratio convergent-divergent algorithm to calculate high wide final ratio, the final size of device display area and high width global offset amount.
5. a kind of page display method based on the IDF formatted file according to claim 1, it is characterized in that, described step 4) according to wait ratio convergent-divergent algorithm calculate the viewing area actual displayed position, size, with rightmargin and the bottom margin of on-screen display (osd) area.
CN2012105819142A 2012-12-27 2012-12-27 Page display method based on IDF (interactive document format) files Pending CN103049430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105819142A CN103049430A (en) 2012-12-27 2012-12-27 Page display method based on IDF (interactive document format) files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105819142A CN103049430A (en) 2012-12-27 2012-12-27 Page display method based on IDF (interactive document format) files

Publications (1)

Publication Number Publication Date
CN103049430A true CN103049430A (en) 2013-04-17

Family

ID=48062075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105819142A Pending CN103049430A (en) 2012-12-27 2012-12-27 Page display method based on IDF (interactive document format) files

Country Status (1)

Country Link
CN (1) CN103049430A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399931A (en) * 2013-08-07 2013-11-20 百度在线网络技术(北京)有限公司 Providing method for search results, terminal, system and rendering method
CN106557458A (en) * 2015-09-25 2017-04-05 北大方正集团有限公司 Electronic composition method and apparatus
CN108427546A (en) * 2018-05-03 2018-08-21 深圳Tcl新技术有限公司 Full screen adaptation method, display device and the storage medium of display device
CN108733336A (en) * 2018-05-21 2018-11-02 北京字节跳动网络技术有限公司 page display method and device
CN108846075A (en) * 2018-06-08 2018-11-20 成都深思科技有限公司 A kind of intelligent distribution rendering method based on organization structure tree
CN110505529A (en) * 2019-08-16 2019-11-26 上海掌学教育科技有限公司 Courseware synchronous display method, device, background server, medium and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477544A (en) * 2002-08-22 2004-02-25 联想(北京)有限公司 Low-resolution display equipment and its method for controlling browser to display web page
CN101419624A (en) * 2008-11-17 2009-04-29 魏新成 Mobile information device and method for browsing web page
CN102057369A (en) * 2008-04-15 2011-05-11 Opera软件股份公司 Method and device for dynamically wrapping text when displaying a selected region of an electronic document
CN102184202A (en) * 2010-04-12 2011-09-14 微软公司 Method of enabling network content suitable for small-sized screen
CN102360294A (en) * 2011-10-18 2012-02-22 青岛海信移动通信技术股份有限公司 Wap page display method and Wap page display device based on WebKit browser
CN102819560A (en) * 2012-06-29 2012-12-12 北京奇虎科技有限公司 Display method and device of picture in webpage

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1477544A (en) * 2002-08-22 2004-02-25 联想(北京)有限公司 Low-resolution display equipment and its method for controlling browser to display web page
CN102057369A (en) * 2008-04-15 2011-05-11 Opera软件股份公司 Method and device for dynamically wrapping text when displaying a selected region of an electronic document
CN101419624A (en) * 2008-11-17 2009-04-29 魏新成 Mobile information device and method for browsing web page
CN102184202A (en) * 2010-04-12 2011-09-14 微软公司 Method of enabling network content suitable for small-sized screen
CN102360294A (en) * 2011-10-18 2012-02-22 青岛海信移动通信技术股份有限公司 Wap page display method and Wap page display device based on WebKit browser
CN102819560A (en) * 2012-06-29 2012-12-12 北京奇虎科技有限公司 Display method and device of picture in webpage

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399931A (en) * 2013-08-07 2013-11-20 百度在线网络技术(北京)有限公司 Providing method for search results, terminal, system and rendering method
CN103399931B (en) * 2013-08-07 2017-07-25 百度在线网络技术(北京)有限公司 Offer method, terminal and the system and rendering intent of search result
CN106557458A (en) * 2015-09-25 2017-04-05 北大方正集团有限公司 Electronic composition method and apparatus
CN108427546A (en) * 2018-05-03 2018-08-21 深圳Tcl新技术有限公司 Full screen adaptation method, display device and the storage medium of display device
CN108733336A (en) * 2018-05-21 2018-11-02 北京字节跳动网络技术有限公司 page display method and device
CN108733336B (en) * 2018-05-21 2021-10-01 北京字节跳动网络技术有限公司 Page display method and device
CN108846075A (en) * 2018-06-08 2018-11-20 成都深思科技有限公司 A kind of intelligent distribution rendering method based on organization structure tree
CN108846075B (en) * 2018-06-08 2021-09-21 成都深思科技有限公司 Intelligent layout presentation method based on organization structure tree
CN110505529A (en) * 2019-08-16 2019-11-26 上海掌学教育科技有限公司 Courseware synchronous display method, device, background server, medium and system

Similar Documents

Publication Publication Date Title
KR101733943B1 (en) Hierarchically-organized control galleries
Frain Responsive web design with HTML5 and CSS3
US11216253B2 (en) Application prototyping tool
US9772978B2 (en) Touch input visualizations based on user interface context
US20120254733A1 (en) Method for Users to Create and Edit Web Page Layouts
CN103049430A (en) Page display method based on IDF (interactive document format) files
US20090106653A1 (en) Adaptive document displaying apparatus and method
US9792268B2 (en) Zoomable web-based wall with natural user interface
US10049095B2 (en) In-context editing of output presentations via automatic pattern detection
CN101763234B (en) Method and device for simulating various screen resolutions
US10776570B2 (en) Supporting digital ink in markup language documents
US20180315400A1 (en) Rendering graphical assets on electronic devices
CN103518195A (en) Apparatus, system and method for vector-based form field document
CN111459501A (en) SVG-based Web configuration picture storage and display system, method and medium
US20140006936A1 (en) Responsive document breakpoints systems and methods
CN114357345A (en) Picture processing method and device, electronic equipment and computer readable storage medium
CN103049547B (en) A kind of iOS page processing method based on IDF document format
US20170031889A1 (en) Creating a communication editable in a browser independent of platform and operating system
JP2008176424A (en) Parts catalog preparation system, parts catalog preparation method, program for making computer execute and computer-readable recording medium
JP5005782B2 (en) Image generation system
CN103049544A (en) Interactive digital document format realizing method based on NXML (newpower extensible markup language)
US20140304650A1 (en) Information presentation corresponding to content purposing masks
CN115469870A (en) File online processing method and device, electronic equipment and medium
Laak Responsive web design workflow
CN115586898A (en) Method and device for generating user interaction UI

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130417