PHP: HTML Tag/Tag data remover, Javascript: Calculate Display Page Data

Closed

(Please refer to the file provided for an example)

Preparing a word document to HTML for display in a set-sized DIV (ie: to be displayed in a simple eBook).

Require a program to do the following:

1. PHP to strip </html tags from file, [and] cut out tags and content

2. Using Javascript, given a certain div size (height, width), calculate how many non-overflow pages the data requires in order to be shown.

----------------------------------------------------------------------------------

1. Given an HTML, write PHP functionality to:

a) Strip tags, but keep the content

b) cut out and all contents (but should be put in a variable, just in case we wish to save this at a later point)

----------------------------------------------------------------------------------

2. With the remaining HTML, use Javascript to split HTML into pages (according to a certain div height/width)

a) given a div size (given a height/width), parse through the HTML contents to see how many pages (of the given size) are needed to display all the content. (***NOTE: see example file)

Hints:

***using JS: clientHeight, write a block of data to the div (a paragraph, or table) and loop through data blocks to see if they overflow.

*** create an array of text, to store each "page" of data

Example logic:

while(exists HTML){

get next data block

if(data does not overflow){

add data to current string

}

else if(data overflows){

push data that fits in the without overflowing, into an array element (page)

use a new string with overflow text to start a fresh string, and continue looping with remaining data

}

}

Skills: CSS, HTML, HTML5, Javascript, PHP

See more: using javascript calculate overflow width, split page html, php string to html, page split, js to write content in div, how to start a ebook, create js with html content, php ebook, how to html program, how do we write the content of a program, write html pages, Remover, php html, php html javascript, parse html, parse an html, html tags, ebook store, parse php table html, parse table javascript, word pages split, javascript html parse, php file array, php text array, table set html

Project ID: #4062929

Awarded to:

mihaidraghicioiu

Seems simple enough. There is a way to do this entirely in PHP as well, for a given font. But the way you describe it is the simplest to implement.

$50 USD in 3 days
(67 Reviews)
4.5

11 freelancers are bidding on average $221 for this job

srinichal

I can deliver the php script

$210 USD in 6 days
(90 Reviews)
7.0
gopalvora

ready to start thanks

$200 USD in 5 days
(139 Reviews)
6.7
LuigiWidmore

Hi sir , My name is Luigi Widmore and i'm an expert web developer. My areas are HTML/CSS PHP/MYSQL Design/Photoshop. I can complete this project in 4 days or less. Please check PM for details , you may be impresse More

$250 USD in 999 days
(98 Reviews)
6.3
swardi

I am available immediately, please check PMB.

$175 USD in 3 days
(43 Reviews)
5.9
techwelf

Hi we checked your requirement,We could develop as per your need. u could check that out. we would work till your satisfaction. Thanks & Regards Techwelfare

$223 USD in 10 days
(39 Reviews)
5.8
corpotec1993

ready to start

$400 USD in 5 days
(32 Reviews)
4.6
vw1880582vw

I'm an experienced web developer of 17 years and can deliver this project with a high level of satisfaction.

$250 USD in 10 days
(6 Reviews)
4.1
MrGolshani

i can do it.

$250 USD in 3 days
(10 Reviews)
3.8
rajeshverma88

Greetings! Ready to start,I can start right away thanks

$250 USD in 15 days
(9 Reviews)
3.6
shabdullah88

Dear sir After reading your project details,we are interested in this project and would like to bid on this project. we take care of our every client personally and has always long term relationship.we will do as many More

$300 USD in 12 days
(8 Reviews)
3.5
mawaiskhansl

Hi,I'll Give you exact solution that you have required..

$120 USD in 4 days
(12 Reviews)
3.4