Skip to content

Commit bca0695

Browse files
committed
Minor documentation improvements
1 parent 38dbf73 commit bca0695

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

docs/CombineWithRoughJS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![Graphics produced by Rough.js](RoughJS.png)
66

77
[Rough.js](https://roughjs.com/) is able to produce SVG files
8-
that can then be embedded by `fpdf2`.
8+
that can then be embedded by `fpdf2` ([with some limitations regarding SVG support](https://py-pdf.github.io/fpdf2/SVG.html#currently-unsupported-notable-svg-features)).
99

1010
This documentation page will guide you on how to do so.
1111

docs/HTML.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pdf.output("html_helvetica.pdf")
168168
* `<ol>`, `<ul>`, `<li>`: ordered, unordered and list items (can be nested)
169169
* `<dl>`, `<dt>`, `<dd>`: description list, title, details (can be nested)
170170
* `<sup>`, `<sub>`: superscript and subscript text
171-
* `<table>`: (with `align`, `border`, `width`, `cellpadding`, `cellspacing` attributes)
171+
* `<table>`: (with `align`, `border`, `width`, `cellpadding`, `cellspacing` attributes) those tags are rendered using [fpdf2 Tables layout](https://py-pdf.github.io/fpdf2/Tables.html) and the following sub-tags are supported:
172172
+ `<thead>`: optional tag, wraps the table header row
173173
+ `<tfoot>`: optional tag, wraps the table footer row
174174
+ `<tbody>`: optional tag, wraps the table rows with actual content

docs/Maths.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Result:
1717

1818
![](matplotlib.png)
1919

20-
You can also embed a figure as [SVG](SVG.md):
20+
You can also embed a figure as [SVG](SVG.md) ([but there may be some limitations](https://py-pdf.github.io/fpdf2/SVG.html#currently-unsupported-notable-svg-features)):
2121

2222
```python
2323
from fpdf import FPDF
@@ -82,7 +82,7 @@ Result:
8282

8383
![](plotly_png.png)
8484

85-
You can also embed a figure as [SVG](SVG.md) but this is not recommended because the text data such as the x and y axis bars might not show as illustrated in the result image because plotly places this data in a svg text tag which is currently [not supported](https://github.com/py-pdf/fpdf2/issues/537) by FPDF2.
85+
While you can also embed a figure as [SVG](SVG.md), this is not recommended as text data - such as the x and y axis bars - might not be displayed, because `plotly` places this data in a SVG text tag which is currently [not supported by `fpdf2`](https://github.com/py-pdf/fpdf2/issues/537).
8686

8787
Before running this example, please install the required dependencies:
8888

@@ -107,7 +107,7 @@ You can install it using: `pip install pygal`
107107
The full list of supported & unsupported SVG features can be found there: [SVG page](SVG.md#supported-svg-features).
108108

109109
You can find documentation on how to convert vector images (SVG) to raster images (PNG, JPG), with a practical example of embedding PyGal charts, there:
110-
[SVG page](SVG.md#converting-vector-graphics-to-raster-graphics).
110+
[SVG page > Converting vector graphics to raster graphics](SVG.md#converting-vector-graphics-to-raster-graphics).
111111

112112

113113
## Mathematical formulas ##

docs/PageFormatAndOrientation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ pdf.output("two-column.pdf")
5858
```
5959

6060
## Viewer preferences ##
61+
Those settings are detailed in the official PDF format specification,
62+
but may not be honored by PDF viewers.
63+
If a setting seems ignored, this is probably not a bug with `fpdf2`, but a choice or a missing feature from your PDF renderer software.
6164

6265
```python
6366
from fpdf import FPDF, ViewerPreferences

docs/SVG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Additionally, `cairosvg` offers various options for optimizing the rendering per
183183

184184
## Warning logs ##
185185

186-
The `fpdf.svg` module produces `WARNING` log messages for **unsupported** SVG tags & attributes.
186+
The `fpdf.svg` module produces `WARNING` log messages for some **unsupported** SVG tags & attributes.
187187
If need be, you can suppress those logs:
188188

189189
```python
@@ -209,11 +209,9 @@ Everything not listed as supported is unsupported, which is a lot. SVG is a
209209
very complex format that has become increasingly complex as it absorbs
210210
more of the entire browser rendering stack into its specification.
211211

212-
However,
213-
there are some pretty commonly used features that are unsupported that may
214-
cause unexpected results (up to and including a normal-looking SVG rendering as
215-
a completely blank PDF). It is very likely that off-the-shelf SVGs will not be
216-
converted fully correctly without some preprocessing.
212+
However, there are some pretty commonly used features that are unsupported
213+
and may cause unexpected results, up to and including a normal-looking SVG
214+
rendering as a completely blank PDF.
217215

218216
There are some common SVG features that are currently **unsupported**, but that `fpdf2` could end up supporting with the help of contributors :
219217

docs/Tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TABLE_DATA = (
1313
("Jules", "Smith", "34", "San Juan"),
1414
("Mary", "Ramos", "45", "Orlando"),
1515
("Carlson", "Banks", "19", "Los Angeles"),
16-
("Lucas", "Cimon", "31", "Saint-Mathurin-sur-Loire"),
16+
("Lucas", "Cimon", "31", "Angers"),
1717
)
1818
pdf = FPDF()
1919
pdf.add_page()

docs/Templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction #
22

3-
Templates are predefined documents (like invoices, tax forms, etc.), or parts of such documents, where each element (text, lines, barcodes, etc.) has a fixed position (x1, y1, x2, y2), style (font, size, etc.) and a default text.
3+
Templates are a `fpdf2` feature that define predefined documents (like invoices, tax forms, etc.), or parts of such documents, where each element (text, lines, barcodes, etc.) has a fixed position (x1, y1, x2, y2), style (font, size, etc.) and a default text.
44

55
These elements can act as placeholders, so the program can change the default text "filling in" the document.
66

docs/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ Online classes & open source projects:
107107
* [Undying Dusk](https://lucas-c.itch.io/undying-dusk) : a **video game in PDF format**, with a gameplay based on exploration and logic puzzles, in the tradition of dungeon crawlers
108108
* [OpenDroneMap](https://github.com/OpenDroneMap/ODM) : a command line toolkit for processing aerial drone imagery
109109
* [OpenSfM](https://github.com/mapillary/OpenSfM) : a Structure from Motion library, serving as a processing pipeline for reconstructing camera poses and 3D scenes from multiple images
110-
* [RPA Framework](https://github.com/robocorp/rpaframework) : libraries and tools for Robotic Process Automation (RPA), designed to be used with both [Robot Framework](https://robotframework.org)
110+
* [RPA Framework](https://github.com/robocorp/rpaframework) : libraries and tools for Robotic Process Automation (RPA), designed to be used with both [Robot Framework](https://robotframework.org) : [rpa-pdf](https://pypi.org/project/rpa-pdf/) package
111111
* [Concordia](https://github.com/LibraryOfCongress/concordia) : a platform developed by the US Library of Congress for crowdsourcing transcription and tagging of text in digitized images
112112
* [wudududu/extract-video-ppt](https://github.com/wudududu/extract-video-ppt) : create a one-page-per-frame PDF from a video or PPT file.
113113
`fpdf2` also has a demo script to convert a GIF into a one-page-per-frame PDF: [gif2pdf.py](https://github.com/py-pdf/fpdf2/blob/master/tutorial/gif2pdf.py)
114-
* [csv2pdf](https://github.com/TECH-SAVVY-GUY/csv2pdf) : convert CSV files to PDF files easily
115114
* [Planet-Matriarchy-RPG-CharGen](https://github.com/ShawnDriscoll/Planet-Matriarchy-RPG-CharGen) : a PyQt based desktop application (= `.exe` under Windows) that provides a RPG character sheet generator
116115

117116
### Usage statistics

0 commit comments

Comments
 (0)