fpdf - tilføj linie
Hej,Jeg har overtaget vedligeholdelsen af en hjemmefra hvorfra der genereres pdf via fpdf. Sidens ejere har nu fået nye kuverter og adressaten skal rykkes en linie ned for at passe i de nye rudekuverter.
Jeg har aldrig arbejdet med dette før - nogen der kan gi' et tip om hvordan jeg gør?
Har prøvet at ændre på disse: $this-> Ln(20);
Har sat et ekstra: "\n"; ind. Men intet virker?
Håber I kan hjælpe ;-)
<?PHP
require("../../inc.conf.php");
require("inc.auth.php");
require("inc.functions.php");
$ORDERID = (isset($_GET["orderid"])) ? $_GET["orderid"] : NULL;
require("fpdf/fpdf.php");
/***************************************************************************************************************************/
class PDF extends FPDF
{
function Header()
{
//$this-> SetFont('Arial', 'B', 14);
//$this-> Image('images/print_logo.png', 11, 10);
//$this-> Ln(20);
}
function Footer()
{
//
}
}
/***************************************************************************************************************************/
$pdf = new PDF('P', 'mm', 'A4');
//$pdf-> SetAutoPageBreak(true);
$pdf-> AliasNbPages();
$pdf-> SetMargins(20, 10);
$pdf-> AddPage();
$pdf-> SetFont('Arial', '', 10);
$pdf-> AddFont('officina','B','officina.php');
$today = "Silkeborg, " . monthToDk(date("F Y"));
$pdf-> Cell(140, 4, $today, 0, 0);
$pdf-> Ln(28);
$sql = "SELECT (best_customers.id) AS best_customer_id, best_customers.firstname, best_customers.lastname,
best_customers.address, best_customers.zip, best_customers.city, DATE_FORMAT(best_orders.ord_date, '%d / %m / %y')
FROM `best_customers`, `best_orders`
WHERE best_customers.id = best_orders.customer_id AND best_orders.id=" . $ORDERID . "";
$res = mysql_query($sql);
while(list($customer_id, $firstname, $lastname, $address, $zip, $city, $ord_date) = mysql_fetch_row($res))
{
$customer = "\n";
$customer .= (strlen($firstname) > 0) ? $firstname . ' ' : '';
$customer .= (strlen($lastname) > 0) ? $lastname . "\n" : '';
$customer .= (strlen($address) > 0) ? $address . "\n" : '';
$customer .= (strlen($zip) > 0) ? $zip . ' ' : '';
$customer .= (strlen($city) > 0) ? $city . "\n" : '';
$customer .= "\n";
$customer = utf8_decode($customer);
$pdf-> MultiCell(130, 5, $customer, 0);
$pdf-> Ln(10);
// ************************** //