hi,
Ich möchte die FPDF Extension verwenden um eine PDF zu genieren.
Mein Php- Code:
require_once(t3lib_extMgm::extPath('fpdf').'class.tx_fpdf.php');
$pdf = t3lib_div::makeInstance('PDF');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hallo Welt!');
$pdf->Output();
Leider kommt auf meiner Seite:
%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x?3R??2?35W(?r Q?w3T04?30PISp ?Z*?[????(hx$???+???(j*?d???? endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 5 0 R >> /XObject << >> >> endobj 6 0 obj << /Producer (FPDF 1.6) /CreationDate (D:20120402180226) >> endobj 7 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /FitH null] /PageLayout /OneColumn >> endobj xref 0 8 0000000000 65535 f 0000000227 00000 n 0000000415 00000 n 0000000009 00000 n 0000000087 00000 n 0000000314 00000 n 0000000519 00000 n 0000000594 00000 n trailer << /Size 8 /Root 7 0 R /Info 6 0 R >> startxref 697 %%EOF
innerhalb des Header- Bereiches statt sich Adobe Reader mit der PDF zu öffnen🙁Was ist denn da falsch?
Wie kann ich dann die erzeugte PDF in einer Typo3 Htmlmail als Anhang hinzufügen
Meine aktueller Mail- Code:
$this->htmlMail = t3lib_div::makeInstance('t3lib_htmlmail');
$this->htmlMail->start();
$this->htmlMail->recipient = $mail;
$this->htmlMail->subject = "Neue Buchung";
$this->htmlMail->from_email = $email_a;
$this->htmlMail->from_name = "$vorname_a $name_a";
$this->htmlMail->returnPath = $this->conf['FromEmail'];
$this->htmlMail->setHTML($this->htmlMail->encodeMsg($html_start.$einleitung.$message.$html_end));
$this->htmlMail->send($this->conf['infomail']);
Hab schon mit
addAttachment($attachment)
probiert leider gibt er mir die Anlage (in diesen Test war das eine einfache HTML- Datei) ohne Anhang in der Mail aus und mein Text die in &message gespeichert ist als .txt Anhang. Das soll doch anders herum sein#paralyzed#
Hoffe auf Hilfe