Hi,
I am able to generate PDF from HTML with header using <page> and <page_header> tag.
Problem is that the HTML content is not properly fit in PDF, although if i view HTML content directly in browser it appears good.
I have tries to use "new HTML2PDF('P','A4', 'fr', false, 'ISO-8859-15', array(5,5,5,5));", but no success.
Can anyone help me.......
my HTML is
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Section 504 Eligibility Determination Summary</title>
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" type="text/css" href="/css/autocomplete.css" />
<link rel="stylesheet" type="text/css" href="/css/forms.css" />
<link rel="stylesheet" type="text/css" href="/css/forms_colorize.css" />
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" src="/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script>
<link rel="stylesheet" type="text/css" href="/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcalendar.css" />
<style type="text/css">
.bold {font-weight: bold;
}
.fs16 { font-size: 16px;
}
.italic { font-style: italic;
}
.w300 {width:300px;
}
.w100pr {width:100%;
}
.mb10 {margin-bottom:10px
}
.nowrap {white-space:nowrap;
}
table.dtable {
border-collapse: collapse;
}
.dtable th,
.dtable td {
padding-left: 0;
padding-right: 0;
}
.data_table {
border:1px solid #525252;
}
.data_table td {
border:1px solid #525252;
padding-left: 5px;
padding-right: 5px;
}
.td_odd
{
width: 20px;
background: #DCDCDC;
}
.subtable{
border:0;
}
.subtable td{
border:0;
}
.pad {
width:10px;
}
.mp0 {
margin:0;
padding:0;
}
</style>
<script>
var calendarsList = ['date'];
var cal;
dhtmlxEvent (window,"load", function () {
cal = new dhtmlxCalendarObject(calendarsList, true, {isYearEditable: true,isMonthEditable: true, isWinHeader: true, headerButtons: "X", headerText: ""});
cal.setDateFormat(appDateFormat);
parent.$k(document.getElementById ('school')).addEventHandler("click", function(){parent.schoolEditHandler(document.getElementById ('school'))});
parent.$k(document.getElementById ('school')).addEventHandler("keydown", function(){parent.schoolEditHandler(document.getElementById ('school'))});
});
</script>
</head>
<body class="form">
<form id="formContainer">
<div class="formWrap">
<page_header>
<br />
<br />
<div class="title center fs16">
<page_header_text>Section 504 Eligibility Determination Summary</page_header_text>
</div>
<br />
<br />
</page_header>
<table class="w100pr dtable">
<tr>
<td style="width:50px;">Student:</td>
<td><input class="w100pr" name="child_name" id="child_name" value="<?php echo $child_name;?>" /></td>
<td style="width:45px;" class="center">Grade:</td>
<td style="width:200px;"><input class="w100pr" name="grade" id="grade" value="<?php echo $grade;?>" /></td>
</tr>
<tr>
<td>School:</td>
<td><input class="w100pr" name="school" id="school" value="<?php echo $school;?>" /></td>
<td class="center">Date:</td>
<td><input class="w100pr" name="date" id="date" value="<?php echo $date;?>" /></td>
</tr>
</table>
<br />
<div>
The Section 504 Team reviewed and considered the following data including the following sources, including referral document: <span class="bold">Check all that apply:</span>
</div>
<table class="data_table w100pr dtable">
<tr>
<td class="td_odd"><input type="checkbox" name="grade_reports" id="grade_reports" /></td>
<td style="width:350px;"><label class="mp0" for="grade_reports">Grade Reports</label></td>
<td class="td_odd"><input type="checkbox" name="teacher_administrator_input" id="teacher_administrator_input" /></td>
<td><label class="mp0" for="teacher_administrator_input">Teacher/Administrator input</label></td>
</tr>
<tr>
<td class="td_odd"><input type="checkbox" name="disciplinary_records" id="disciplinary_records" /></td>
<td><label class="mp0" for="disciplinary_records">Disciplinary records</label></td>
<td class="td_odd"><input type="checkbox" name="student_work_portfolio" id="student_work_portfolio" /></td>
<td><label class="mp0" for="student_work_portfolio">Student work portfolio</label></td>
</tr>
<tr>
<td class="td_odd"><input type="checkbox" name="standardized_tests" id="standardized_tests" checked="<?php if($standardized_tests=='on') echo "checked"; ?>" /></td>
<td><label class="mp0" for="standardized_tests">Standardized tests</label></td>
<td class="td_odd"><input type="checkbox" name="school_health_information" id="school_health_information" /></td>
<td><label class="mp0" for="school_health_information">School health information</label></td>
</tr>
<tr>
<td class="td_odd"><input type="checkbox" name="medical_evaluation_diagnosis" id="medical_evaluation_diagnosis" /></td>
<td><label class="mp0" for="medical_evaluation_diagnosis">Medical Evaluation/diagnosis</label></td>
<td class="td_odd"><input type="checkbox" name="parent_input" id="parent_input" /></td>
<td><label class="mp0" for="parent_input">Parent input</label></td>
</tr>
<tr>
<td class="td_odd"><input type="checkbox" name="checkbox_other1" id="checkbox_other1" checked="<?php if($checkbox_other1=='on') echo "checked"; ?>" /></td>
<td>Other:<input onBlur="if (this.value.length > 0) is_checked=true; else is_checked=false; document.getElementById('checkbox_other1').checked = is_checked;" style="width:310px; border:0 none;" name="other1" id="other1" value="<?php echo $other1;?>" /></td>
<td class="td_odd"><input type="checkbox" name="checkbox_other2" id="checkbox_other2" /></td>
<td>Other:<input onBlur="if (this.value.length > 0) is_checked=true; else is_checked=false; document.getElementById('checkbox_other2').checked = is_checked;" style="width:310px; border:0 none;" name="other2" id="other2" /></td>
</tr>
</table>
<br />
<br />
<table style="table-layout:fixed;" class="data_table w100pr dtable">
<tr>
<td style="width:50px; background: #DCDCDC;">Yes</td>
<td style="width:50px; background: #DCDCDC;">No</td>
<td style="background: #DCDCDC;">Based on the evaluation data gathered from a variety of sources, the 504 Team answered the following questions to determine Section 504 eligibility: </td>
</tr>
<tr>
<td><input type="radio" value="Yes" name="question1"></td>
<td><input type="radio" value="No" name="question1"></td>
<td>
<table class="subtable w100pr">
<tr>
<td style="width:30px;">1.</td>
<td>Does the student have a physical or mental impairment? If so, please describe the impairment. NOTE: This is an educational determination only, and not a medical diagnosis for purpose of treatment</td>
</tr>
<tr>
<td></td>
<td><textarea class="w100prc" name="physical_or_mental_impairment" rows="4"><?php echo $physical_or_mental_impairment;?></textarea></td>
</tr>
<tr>
<td></td>
<td>If yes, describe the type of impairment in A or B.</td>
</tr>
<tr>
<td style="width:30px;">A.</td>
<td>Is the impairment long term? (transitory and minor impairments with actual or expected duration of six months or less would not be considered a disability)</td>
</tr>
<tr>
<td></td>
<td><textarea class="w100prc" name="long_term_impairment" rows="4"><?php echo $long_term_impairment;?></textarea></td>
</tr>
<tr>
<td style="width:30px;">B.</td>
<td>Is the impairment episodic or in remission and substantially limits a major life function?</td>
</tr>
<tr>
<td></td>
<td><textarea class="w100prc" name="episodic_impairment" rows="4"><?php echo $episodic_impairment;?></textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><input type="radio" value="Yes" name="question2"></td>
<td><input type="radio" value="No" name="question2"></td>
<td>
<table class="subtable w100pr">
<tr>
<td style="width:30px;">2.</td>
<td>Does the physical or mental impairment affect one or more major life activities?
If so, which major life activity or activities are affected? Check all that apply. (The list below is not all inclusive)</td>
</tr>
<tr>
<td></td>
<td>
<table>
<tr>
<td>
<label><input type="checkbox" name="activity_self_caring" id="activity_self_caring" /> caring for one’s self</label><br />
<label><input type="checkbox" name="activity_reading" id="activity_reading" /> reading</label><br />
<label><input type="checkbox" name="activity_thinking" id="activity_thinking" /> thinking</label><br />
<label><input type="checkbox" name="activity_concentrating" id="activity_concentrating" /> concentrating</label><br />
<label><input type="checkbox" name="activity_walking" id="activity_walking" /> walking</label><br />
<label><input type="checkbox" name="activity_seeing" id="activity_seeing" /> seeing</label><br />
<label><input type="checkbox" name="activity_speaking" id="activity_speaking" /> speaking</label><br />
<label><input type="checkbox" name="activity_learning" id="activity_learning" /> learning</label><br />
<label><input type="checkbox" name="activity_performing_manual_tasks" id="activity_performing_manual_tasks" /> performing manual tasks</label><br />
<label><input type="checkbox" name="activity_hearing" id="activity_hearing" /> hearing</label><br />
<label><input type="checkbox" name="activity_breathing" id="activity_breathing" /> breathing</label><br />
<label><input type="checkbox" name="activity_working" id="activity_working" /> working</label><br />
</td>
<td>
<label><input type="checkbox" name="activity_standing" id="activity_standing" /> standing</label><br />
<label><input type="checkbox" name="activity_lifting" id="activity_lifting" /> lifting</label><br />
<label><input type="checkbox" name="activity_bending" id="activity_bending" /> bending</label><br />
<label><input type="checkbox" name="activity_operation_of_bodily_functions" id="activity_operation_of_bodily_functions" /> operation of bodily functions</label><br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
</div>
</form>
</body>
</html>