You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_⚠️ This section has changed a lot and requires a new translation: <https://github.com/py-pdf/fpdf2/issues/267>_
150
+
Das erste Beispiel wird auf die einfachst mögliche Weise umgesetzt, und einfach nur die Daten in die Tabelle eingefügt. Das Ergebnis ist eine sehr schlichte Darstellung, kann aber sehr schnell erzeugt werden.
151
151
152
-
English versions:
152
+
Die zweite Tabelle bringt einige Verfeinerungen: Farben, reduzierte Gesamtbreite, geringere Zeilenhöhe, zentrierter Text, individuelle Spaltenbreiten und rechts justierte Zahlenwerte. Zusätzliche wurden die horizontalen Linien ausgeblendet. Dies wird dadurch erreicht, dass das Argument `borders_layout` einen geeigneten Wert des Enums [`TableBordersLayout`](https://py-pdf.github.io/fpdf2/fpdf/enums.html#fpdf.enums.TableBordersLayout) erhält.
Este recoge todo el texto, posiblemente en incrementos, y lo distribuye entre el número de columnas solicitadas, insertando automáticamente saltos de página según sea necesario. Nota que mientras la instancia de `TextColumns` está activa como gestor de contexto, los estilos de texto y otras propiedades de la fuente pueden cambiarse. Estos cambios estarán contenidos en el contexto. Una vez se cierre, la configuración previa será reestablecida.
160
161
161
-
Utilizando el método [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break), una vez
162
-
la celda cruce el límite inferior de la página, éste comprobará el número de la columna actual. Si
163
-
es menor que 2 (decidimos dividir la página en tres columnas) éste invocará al método set_col,
164
-
incrementando el número de columna y alterando la posición de la siguiente columna tal que el texto pueda continuar aquí.
165
-
166
-
Una vez el límite inferior de la tercera columna es alcanzado, el
167
-
método [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) se reiniciará y
168
-
volverá a la primera columna, desencadenando un salto de página.
169
162
170
163
## Tutorial 5 - Creando tablas ##
171
164
165
+
Este tutorial explicará cómo crear dos tablas diferentes,
166
+
para demostrar lo que se puede lograr con algunos ajustes simples.
[Archivo de texto con países](https://github.com/py-pdf/fpdf2/raw/master/tutorial/countries.txt)
178
174
179
-
_⚠️ This section has changed a lot and requires a new translation: <https://github.com/py-pdf/fpdf2/issues/267>_
180
-
181
-
English versions:
175
+
El primer ejemplo es alcanzado de la forma más básica posible, alimentando datos a [`FPDF.table()`](https://py-pdf.github.io/fpdf2/Tables.html). El resultado es rudimentario pero muy rápido de obtener.
Copy file name to clipboardexpand all lines: docs/Tutorial-fr.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -103,11 +103,13 @@ Cet exemple est une variante du précédent qui montre comment répartir le text
103
103
104
104
[Extrait de Jules Verne](https://github.com/py-pdf/fpdf2/raw/master/tutorial/20k_c1.txt)
105
105
106
-
La principale différence avec le tutoriel précédent est l'utilisation des méthodes [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) et `set_col()`.
106
+
_⚠️ This section has changed a lot and requires a new translation: <https://github.com/py-pdf/fpdf2/issues/267>_
107
107
108
-
En utilisant la méthode [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break), une fois que la cellule franchit la limite inférieure de la page, elle vérifie le numéro de la colonne actuelle. Si celui-ci est inférieur à 2 (nous avons choisi de diviser la page en trois colonnes), il appelle la méthode `set_col()`, en augmentant le numéro de la colonne et en modifiant la position de la colonne suivante pour que le texte puisse s'y poursuivre.
108
+
English versions:
109
+
110
+
*[Tuto 4 - Multi Columns](https://py-pdf.github.io/fpdf2/Tutorial.html#tuto-4-multi-columns)
111
+
*[Documentation on TextColumns](https://py-pdf.github.io/fpdf2/TextColumns.html
109
112
110
-
Une fois que la limite inférieure de la troisième colonne est atteinte, la méthode [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) sera réinitialisée et retournera à la première colonne. Cela déclenchera un saut de page.
111
113
112
114
## Tuto 5 - Créer des tables ##
113
115
Ce tutoriel explique comment créer facilement des tableaux. Deux tableaux différents sont générés, pour illustrer ce qui peut être produit avec de très simples changements.
[Κείμενο του Jules Verne](https://github.com/py-pdf/fpdf2/raw/master/tutorial/20k_c1.txt)
103
103
104
-
Η κύρια διαφορά από το προηγούμενο παράδειγμα είναι η χρήση των μεθόδων [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) και set_col.
104
+
_⚠️ This section has changed a lot and requires a new translation: <https://github.com/py-pdf/fpdf2/issues/267>_
105
+
106
+
English versions:
105
107
106
-
Χρησιμοποιώντας την μέθοδο [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break), μόλις το κελί ξεπεράσει το κάτω όριο της σελίδας, γίνεται έλεγχος του αριθμού της τωρινής στήλης. Εάν ο αριθμός αυτός είναι μικρότερος του 2 (επιλέξαμε την κατανομή της σελίδας σε τρεις στήλες) θα κληθεί η μέθοδος set_col, αυξάνοντας τον αριθμό στήλης και αλλάζοντας την θέση της αμέσως επόμενης στήλης έτσι ώστε το κείμενο να συνεχιστεί εκεί.
108
+
*[Tuto 4 - Multi Columns](https://py-pdf.github.io/fpdf2/Tutorial.html#tuto-4-multi-columns)
109
+
*[Documentation on TextColumns](https://py-pdf.github.io/fpdf2/TextColumns.html
107
110
108
-
Μόλις φτάσουμε στο το κάτω όριο σελίδας της τρίτης στήλης, η μέθοδος [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) επαναφέρεται και μεταφερόμαστε ξανά πίσω στην πρώτη στήλη όπου πραγματοποιείται αλλαγή σελίδας.
היא אוספת את כל הטקסט, ומפזרת אותו על מספר העמודות המבוקש (לפעמים מגדילה אותו), ואוטומטית מעבירה עמוד כשצריך. שימו לב שבזמן שמופע של `TextColumns` פועל כמנהל הקשר (context manager), עיצוב של טקסט ואלמנטים נוספים עשויים להשתנות. שינויים אלה מוכלים בהקשר.
112
+
ברגע שהמופע נסגר, ההגדרות הקודמות יוחלו שוב.
110
113
111
-
ע"י שימוש במתודה [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break), ברגע שתא חורג מהגבול התחתון של הדף, המתודה בודקת את מספר העמודה הנוכחי. אם הוא קטן מ2 (בחרנו לחלק את הדף ל3 עמודות) תיקרא המתודה set_col, שמגדילה את מספר העמודה ומשנה את הפוזיציה של העמודה הבאה כך שהטקסט ימשיך בה.
114
+
## 5 - יצירת טבלאות ##
115
+
דוגמא זו מסבירה כיצד ניתן ליצור שתי טבלאותשונות, על מנת להדגים מה ניתן להשיג באמצעות התאמות קטנות.
ברגע שהגענו לגבול התחתון של העמודה השלישית, המתודה [accept_page_break](fpdf/fpdf.html#fpdf.fpdf.FPDF.accept_page_break) תאותחל, תחזור לעמודה הראשונה ותיצור מעבר עמוד.
114
133
115
-
## 5 - יצירת טבלאות ##
116
134
117
135
```python
118
136
{% include "../tutorial/tuto5.py"%}
@@ -151,4 +169,4 @@ English versions:
151
169
152
170
ניתן גם להשתמש במתודה `()write_html` כדי לשנות סגנונות גופן ולהוסיף קישורים. זהו פארסר של html, שמאפשר להוסיף טקסט, לשנות את הסגנון ולהוסיף קישורים באמצעות html.
0 commit comments