Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problem mit FPDF

Empfohlene Antworten

Hallo,

ich habe ein HTML-Formular erstellt, in das Variablen eingegeben werden sollen. Diese Werte werden dann mit $_POST an eine PHP-Datei übergeben, in der mittels PDF ein neues Blatt generiert wird.

Jetzt ist es so, daß ich unter anderem auch ein Start- und ein Enddatum übergebe, das in einer MySQL-Abfrage in der genannten PHP-Datei verwendet werden soll, aber leider funktioniert das nicht so, wie ich mir das gedacht habe.

Die MySQL-Abfrage sieht so aus


$sql = ("SELECT COUNT(*), DATE_FORMAT(SchedDate,'%d.%m.%y') AS SchedDate 

FROM `tbl_LIST` WHERE SchedDate BETWEEN ".$_POST['startdate']." AND

 ".$_POST['enddate']."");

und die Variable $sql wollte ich so verwenden:

$pdf->Cell(20,7,$legs,0,0,'R',1);

Danke schon mal für Eure Hilfe,

-etops-

bitte ma ausführlicher.

ich raffs nicht ;)

was willst du mit $sql machen?

Gruß,

Markus

Hat sich erledigt, danke - ich hab mich eben etwas doof angestellt ;-)

Dafür habe ich jetzt ein anderes Problem: Mit JPGraph erstelle ich etliche Graphen, die alle jeweils in jpeg-Dateien gespeichert werden. Das funktioniert auch; im Bildbearbeitungsprogramm sehe ich einwandfreie Dateien.

Diese Graphen möchte ich aber gerne in meine PDF-Datei einbinden, nur bekomme ich immer wieder den Fehler

"FPDF error: Not a JPEG file: ../images/graph.jpeg"

Weiß jemand, wo ich die Ursache suchen muß? Wie gesagt, im Bildbearbeitungsprogramm gehts... :eek: :rolleyes: :confused:

Grüße

-etops-

Hi etops ,

"FPDF error: Not a JPEG file: ../images/graph.jpeg"

Ich gehe davon aus das du den Graphen vorher im Script erstellst und dann im Verzeichnis /images/graph.jpeg abspeichert.

Falls JPGraph auch PNG unterstützt, würde ich es einmal mit einem PNG Bild versuchen, vielleicht liegt es an einer Einstellungen für das JPEG Bild .

For JPEG, all flavors are allowed:

* gray scales

* true colors (24 bits)

* CMYK (32 bits)

For PNG, are allowed:

* gray scales on at most 8 bits (256 levels)

* indexed colors

* true colors (24 bits)

but are not supported:

* Interlacing

* Alpha channel

Vielleicht hilft dir das weiter .

Gruß Tool-Time

PS: die neue 1.53 FPDF Version ist drausen

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.