Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Pdf
Forum PHP.pl > Forum > PHP
slaug
Czesc.

Wiem, ze temat generowanie pdf'ow byl walkowany, ale odpowiedzi na swoje pytanie nie znalazlem. W sumie to nie jest ono nawet do konca z php zwiazane.

Mianowicie, pobieram dane z tabeli mysql i wrzucam je do tabeli na stronie. I teraz chcialbym aby przeniesc tabele do pdfa. Czysty tekst wiem jak, ale chodzi mi o tabele z danymi.

Moje pytanie: czy wiecie jakich funkcji (chyba PDFa) powinienem uzyc zeby stworzyc tabelke w pdfie, ewentualnie jezeli ktos zna linka gdzie moglbym o tym poczytac to byloby wogole super.

Z gory dziekuje wszystkim za odpowiedz.

pozdrawiam,
Daniel
Dabroz
FPDF

Cytat
Cell
Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, int fill [, mixed link]]]]]]])
Version
1.0
Description
Prints a cell (rectangular area) with optional borders, background color and character string. The upper-left corner of the cell corresponds to the current position. The text can be aligned or centered. After the call, the current position moves to the right or to the next line. It is possible to put a link on the text.
If automatic page breaking is enabled and the cell goes beyond the limit, a page break is done before outputting.
Parameters
w
Cell width. If 0, the cell extends up to the right margin.
h
Cell height. Default value: 0.
txt
String to print. Default value: empty string.
border
Indicates if borders must be drawn around the cell. The value can be either a number:
0: no border
1: frame
or a string containing some or all of the following characters (in any order):
L: left
T: top
R: right
B: bottom
Default value: 0.
ln
Indicates where the current position should go after the call. Possible values are:
0: to the right
1: to the beginning of the next line
2: below
Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: 0.
align
Allows to center or align the text. Possible values are:
L or empty string: left align (default value)
C: center
R: right align
fill
Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
link
URL or identifier returned by AddLink().

Example

  1. <?php
  2. //Set font
  3. $pdf->SetFont('Arial','B',16);
  4. //Move to 8 cm to the right
  5. $pdf->Cell(80);
  6. //Centered text in a framed 20*10 mm cell and line break
  7. $pdf->Cell(20,10,'Title',1,1,'C');
  8. ?>
slaug
Tylko to jest funkcja z zewnętrznej biblioteki, prawda?

A ja piszę komercyjną rzecz i nie mogę takowych używać. Chodziło mi raczej o to jak w języku PDFa to zapisać.
itsme
Cytat(slaug @ 2004-08-22 22:11:26)
Tylko to jest funkcja z zewnętrznej biblioteki, prawda?

A ja piszę komercyjną rzecz i nie mogę takowych używać. Chodziło mi raczej o to jak w języku PDFa to zapisać.

proponuje zobaczyc na jakiej licencji jest oparte FPDF
ponadto na ich stronie jest cos takiego http://pdml.sourceforge.net/
wrzuca HTML-a poprzez fpdf do pdf ....

zas swoja droga ADODB i SMARTY jak i sam php.net tez jest oparty na licencji ktora jednak pozwala na komercyjne wykorzystanie

poczytaj ...
slaug
The advantage is that PDFlib requires a fee for a commercial usage. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

Fajnie smile.gif


Dzięki za wskazówki, zabieram się do lektury smile.gif

pozdrawiam,
Daniel
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.