I gang

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

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


***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




Given: HTML
PHP part of program should be able:
1. Remove [html] tags
2. Cut out [style] tags and data
JAVASCRIPT part of the program should
1. Given a set div size and HTML content to display (from above), cut the HTML content and place into div size where no overflow exists (in essense, to count the amount of div, or pages, to show all the data)

No DB creation or insertion. No fancy output, just the PHP functionality is required.

Færdigheder: CSS, HTML, HMLT5, Javascript, PHP

Se mere: 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

Om arbejdsgiveren:
( 45 bedømmelser ) Kaohsiung City, Taiwan

Projekt-ID: #4062929

Tildelt til:


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 dage
(72 bedømmelser)

10 freelancers are bidding on average $221 for this job


ready to start thanks

$200 USD in 5 dage
(453 bedømmelser)

I can deliver the php script

$210 USD in 6 dage
(142 bedømmelser)

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 Mere

$250 USD in 999 dage
(125 bedømmelser)

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 [url removed, login to view] will do as many Mere

$300 USD in 12 dage
(19 bedømmelser)

I am available immediately, please check PMB.

$175 USD in 3 dage
(43 bedømmelser)

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

$250 USD in 10 dage
(36 bedømmelser)

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

$250 USD in 15 dage
(56 bedømmelser)

ready to start

$400 USD in 5 dage
(42 bedømmelser)

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

$120 USD in 4 dage
(12 bedømmelser)