Completed

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

This project was successfully completed by mihaidraghicioiu for $50 USD in 3 days.

Get free quotes for a project like this
Employer working
Completed by:
Skills Required
Project Budget
$30 - $250 USD
Completed In
3 days
Total Bids
12
Project Description

(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
}

}

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online