I am either really stupid or there is no solution for my problem, I have created a report with php, however the report uses multiple pages to be displayed, so I figured that I would put it into PDF so the user can just click print and it will all work out page brakes and so on. My report consists of this, by the way I have already looked at FPDF and R&OS, and they tell me nothing how to do this, I do have PDFlib installed in the webdeamon if that helps here is the code that I am trying to convert. Please help!
<?php
$From = $_GET['From'];
$To = $_GET['To'];
$REPORTS = $_GET['REPORTS'];
$limit = '10';
include_once("header.php");
mysql_connect("");
mysql_select_db("");
if($REPORTS=='1'){
if (empty($offset) || $offset < 0) {
$offset=0;
}
if (empty($index)) $index=0; /* This is to count the line index of the results */
$getrows = mysql_query("SELECT * FROM KEYCAD WHERE (PROCESSEDDATE BETWEEN '$From' AND '$To') AND ACTIVE LIKE 'Y'");
$numrows=mysql_num_rows($getrows);
$query = mysql_query("SELECT * from KEYCAD WHERE (PROCESSEDDATE BETWEEN '$From' AND '$To') AND ACTIVE LIKE 'Y' limit $offset,$limit");
while ($row=mysql_fetch_array($query)){
$index++;
//Display Data here
}
echo"<table height='50'></table>\n";
include("footer.php");
}
//not all code included but I hope you get the idea.
?>
Thanks in advance for any help!