Schrift
Wiki:Tipp zum Debugging: use Data::Dumper; local $Data::Dumper::Useqq = 1; print Dumper \@var;
[thread]1080[/thread]

Php zur pdf umwandeln



<< >> 4 Einträge, 1 Seite
Gast Gast
 2007-06-26 17:47
#10066 #10066
hallo ,
ich wollte folgendes weg eingehen : und zwar die unten eingegebene Php datei im pdf umwandln.

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php 
session_start();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


<?php



<table width="680" height="869" cellspacing="10">
<tr>
<td width="480" height="250" colspan='3' >
<h2><br><br>Personen</h2><br><br><br><br></td>
<td width="200" align='right' valign="middle">
<div id='Foto'><img src=<? echo $_SESSION['bild']; ?> </div></td>
</tr>
<tr>
<td width='250'>
<font size='3'>Name:</font> </td>

<td class="box" colspan='3'>
<div align="center"><font size='4'><? echo $_SESSION['name']; ?></font> </div></td>
</tr>

<tr>
<td>
<font size='3'>Bei Abteilung:</font> </td>

<td class="box" width='200'>
<div align="center"><font size='4' class="box"><? echo $_SESSION['abteilung']; ?></font> </div></td>



</tr>

<tr>
<td>
<font size='3'>Funktion:</font> </td>

<td class="box" colspan='3'>
<div align="center"><font size='4'><? echo ((strlen($_SESSION['funktion'])==0)?'&nbsp; ':$_SESSION['funktion']); ?></font> </div></td>
</tr>

<tr>
<td>
<font size='3'>Status:</font> </td>

<td class="box" colspan='3'>
<div align="center"><font size='4'><? echo $_SESSION['status']; ?></font> </div></td>
</tr>

<tr>
<td height="25" colspan='4'>
</tr>





<tr>
<td height="25" colspan='4'>
</tr>

<tr>
<td height="75" colspan='7' > <span class="Stil7">Bemerkung:</span> </td>
</tr>
<tr>
<td height="45" colspan='5' class='box'>
<font size='4' class="box"><? echo ((strlen($_SESSION['bemerkung'])==0)?'&nbsp; ':$_SESSION['bemerkung']); ?></font> </td>



</tr>
</table>
<p>
<?


echo "<script LANGUAGE='JavaScript'>
setTimeout('self.close();', 1);
</script> ";
}

?>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>


weiss jemand wie kann ich die umwandlung machen?

danke im voraus
Ishka
 2007-06-26 18:47
#10067 #10067
User since
2003-08-04
771 Artikel
HausmeisterIn
[Homepage] [default_avatar]
Inwiefern willst du das umwandeln? Die html-Ausgabe in ein pdf? Oder willst du ein pdf, was ebenfalls mit der Session rumhantieren kann? Oder willst du den Code jemandem als pdf zeigen?
sub z{if(@_){1while$x[$k=rand 10];t($t=$x[$k]=1)}print map"$z[$x[$_]]$_".($_%3?
"":"\n"),1..9}sub t{$j=0;$x[$_+1]==$t&&($j+=2**$_)for 0..8;z,die"Gewinner $z[$t]
"if grep$_==($j&$_),7,56,73,84,146,273,292,448;z,die"Gleichstand\n"if@x>9&&!grep
!$_,@x}@x=4;@z=qw{. [ (};z$^T&1;while(<>){next if$_>9||$x[$_];t$t=$x[$_]=2;z 1}
nour
 2007-06-29 11:57
#10068 #10068
User since
2006-11-15
108 Artikel
BenutzerIn
[default_avatar]
Hallo
ich will die html ausgabe in ein pdf!

Soweit ich wusste man kann kein html ins Php direkt umwandeln nur mit php dateien kann man das machen.
Ich habe im internet recherchiert hier ist einen Beispiel mit fpdf.


Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
<?php
require('fpdf.php');

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World !');

header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="mein.pdf"');
$pdf->Output();


nun wie kann ich jetzt statt die "hello word!" oben im php code mit meinen Code ersetze damit ich die ausgabe im pdf bekomme?
oder gibt es vielelicht eien andere möglichkei?

Danke im voraus

nour
Ishka
 2007-06-29 17:20
#10069 #10069
User since
2003-08-04
771 Artikel
HausmeisterIn
[Homepage] [default_avatar]
html in pdf umwandeln stell ich mir ehrlich gesagt leichter vor. Das geht zum Beispiel damit: http://www.easysw.com/htmldoc/pdf-o-matic.php (erster Treffer bei ner Google-Suche, gibt bestimmt noch viele weitere).
sub z{if(@_){1while$x[$k=rand 10];t($t=$x[$k]=1)}print map"$z[$x[$_]]$_".($_%3?
"":"\n"),1..9}sub t{$j=0;$x[$_+1]==$t&&($j+=2**$_)for 0..8;z,die"Gewinner $z[$t]
"if grep$_==($j&$_),7,56,73,84,146,273,292,448;z,die"Gleichstand\n"if@x>9&&!grep
!$_,@x}@x=4;@z=qw{. [ (};z$^T&1;while(<>){next if$_>9||$x[$_];t$t=$x[$_]=2;z 1}
<< >> 4 Einträge, 1 Seite



View all threads created 2007-06-26 17:47.