From 435fc5dcb9f23ed57eb73dd1658629baa82162aa Mon Sep 17 00:00:00 2001 From: Fazal Akbar Date: Tue, 30 Jun 2026 01:36:48 +0500 Subject: [PATCH 1/4] Fixed the broken anchor links for Margins.md, PageFormatAndOrientation.md, TextColumns.md and TextRegion.md. --- docs/Margins.md | 12 ++++++------ docs/PageFormatAndOrientation.md | 2 +- docs/TextColumns.md | 4 ++-- docs/TextRegion.md | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/Margins.md b/docs/Margins.md index d0f6a5fe8..d6ba896c6 100644 --- a/docs/Margins.md +++ b/docs/Margins.md @@ -14,9 +14,9 @@ pdf.set_margin(0) Several methods can be used to set margins: -* [set_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_margin) -* [set_left_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_left_margin) -* [set_right_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_right_margin) -* [set_top_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_top_margin) -* [set_margins](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_margins) -* [set_auto_page_break](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_auto_page_break) +* [set_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_margin) +* [set_left_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_left_margin) +* [set_right_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_right_margin) +* [set_top_margin](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_top_margin) +* [set_margins](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_margins) +* [set_auto_page_break](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_auto_page_break) diff --git a/docs/PageFormatAndOrientation.md b/docs/PageFormatAndOrientation.md index 982c9817e..bc1e90455 100644 --- a/docs/PageFormatAndOrientation.md +++ b/docs/PageFormatAndOrientation.md @@ -38,7 +38,7 @@ Similarly, an `orientation` parameter can be provided to the [`add_page`](https: ## Page layout & zoom level ## -[`set_display_mode()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.FPDF.set_display_mode) allows to set the **zoom level**: +[`set_display_mode()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.set_display_mode) allows to set the **zoom level**: pages can be displayed entirely on screen, occupy the full width of the window, use the real size, be scaled by a specific zooming factor or use the viewer default (configured in its _Preferences_ menu). diff --git a/docs/TextColumns.md b/docs/TextColumns.md index 80cb2de46..accc23cb0 100644 --- a/docs/TextColumns.md +++ b/docs/TextColumns.md @@ -7,8 +7,8 @@ Columns will always be of equal width. Text columns support all the standard [text region](TextRegion.md) methods, and some extra ones: * [`.paragraph()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.TextColumns.paragraph) -* [`.write()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.TextColumns.write) -* [`.ln()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.TextColumns.ln) +* [`.write()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.Paragraph.write) +* [`.ln()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.ParagraphCollectorMixin.ln) * [`.new_column()`](https://py-pdf.github.io/fpdf2/fpdf/text_region.html#fpdf.text_region.TextColumns.new_column) A **form feed** character (`\u000c`) in the text will have the same effect as an explicit call to `.new_column()`, diff --git a/docs/TextRegion.md b/docs/TextRegion.md index b48ada3cc..a1fe6d831 100644 --- a/docs/TextRegion.md +++ b/docs/TextRegion.md @@ -15,7 +15,7 @@ Other types like Table cells, shaped regions and combinations are still in the d ## General Operation ## Using the different region types and combination always follows the same pattern. The main difference to the normal `FPDF.write()` method is that all added text will first be buffered, and only gets rendered on the page when the context of the region is closed. This is necessary so that text can be aligned within the given boundaries even if its font, style, or size are arbitrarily varied along the way. -* Create the region instance with an `FPDF` method, , for example [text_columns()](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.text_columns). +* Create the region instance with an `FPDF` method, , for example [text_columns()](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.text_columns). From 132c4a819b2bb98de1dc9ca6a57bcbf0678caab4 Mon Sep 17 00:00:00 2001 From: Fazal Akbar Date: Tue, 30 Jun 2026 05:08:31 +0500 Subject: [PATCH 2/4] Fixed a broken anchor link in Images.md. --- docs/Images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Images.md b/docs/Images.md index 17433d578..7931e68f3 100644 --- a/docs/Images.md +++ b/docs/Images.md @@ -240,7 +240,7 @@ _New in [:octicons-tag-24: 2.8.3](https://github.com/py-pdf/fpdf2/blob/master/CH The dedicated method for adding output intent to a PDF is [`add_output_intent()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.add_output_intent). -You can optionally provide a [`PDFICCProfileObject`](https://py-pdf.github.io/fpdf2/fpdf/output.html#fpdf.output.PDFICCProfileObject) as `icc_profile`. +You can optionally provide a [`PDFICCProfileObject`](https://py-pdf.github.io/fpdf2/fpdf/output.html#fpdf.output.PDFICCProfile) as `icc_profile`. Example: ```python From edfac0f95e7cb4b5bc67eaae2832cdc237e36108 Mon Sep 17 00:00:00 2001 From: Fazal Akbar Date: Thu, 2 Jul 2026 05:05:44 +0500 Subject: [PATCH 3/4] Added an entry about fixing broken anchor links to CHANGELOG.md. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eef7578b..10ca9bce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ This can also be enabled programmatically with `warnings.simplefilter('default', * leading spaces on new lines inside `
` and `
` blocks are no longer dropped - _cf._ [issue #1063](https://github.com/py-pdf/fpdf2/issues/1063)
 * `FPDF.set_font()` can restore `current_font` when the selected font state diverged - _cf._ [PR #1872](https://github.com/py-pdf/fpdf2/pull/1872)
 * embed CID-keyed CFF fonts as raw CFF programs so browser PDF viewers render them correctly - _cf._ [issue #1874](https://github.com/py-pdf/fpdf2/issues/1874)
+* fixed broken links on documentation not directly leading to the API reference - _cf._ [issue #1876](https://github.com/py-pdf/fpdf2/issues/1876)
 ### Changed
 * skip byte-for-byte compressed data comparison when zlib-ng is detected, regardless of OS
 

From b74d240161f5fa50457cd80634e0e207ea4dd71e Mon Sep 17 00:00:00 2001
From: Fazal Akbar 
Date: Thu, 2 Jul 2026 06:43:06 +0500
Subject: [PATCH 4/4] Replaced links that lead to other parts of the
 documentation instead of the API reference.

---
 docs/DocumentOutlineAndTableOfContents.md |  2 +-
 docs/Links.md                             | 10 +++++-----
 docs/Tables.md                            | 14 +++++++-------
 docs/Text.md                              |  6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/docs/DocumentOutlineAndTableOfContents.md b/docs/DocumentOutlineAndTableOfContents.md
index bf500e4ec..8ae3fe44b 100644
--- a/docs/DocumentOutlineAndTableOfContents.md
+++ b/docs/DocumentOutlineAndTableOfContents.md
@@ -67,7 +67,7 @@ pdf.insert_toc_placeholder(toc.render_toc, allow_extra_pages=True)
 ---
 
 ## Using Outlines and ToC with HTML
-When using [`FPDF.write_html`](HTML.md), a document outline is automatically generated, and a ToC can be added with the `` tag.
+When using [`FPDF.write_html`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html), a document outline is automatically generated, and a ToC can be added with the `` tag.
 
 To customize ToC styling, override the `render_toc` method in a subclass:
 
diff --git a/docs/Links.md b/docs/Links.md
index e2722c56c..86b916a7b 100644
--- a/docs/Links.md
+++ b/docs/Links.md
@@ -36,7 +36,7 @@ pdf.multi_cell(
 pdf.output("hyperlink.pdf")
 ```
 
-Links defined this way in Markdown can be styled by setting `FPDF` class attributes `MARKDOWN_LINK_COLOR` (default: `None`) & `MARKDOWN_LINK_UNDERLINE` (default: `True`).  
+Links defined this way in Markdown can be styled by setting `FPDF` class attributes `MARKDOWN_LINK_COLOR` (default: `None`) & `MARKDOWN_LINK_UNDERLINE` (default: `True`).
 Links can also be styled by embedding them in markdown style markers (`**bold**, __italics__, --underlined--, ~~strikethrough~~`):
 
 ```python
@@ -79,7 +79,7 @@ pdf.output("hyperlink.pdf")
 
 ## Hyperlink with write_html ##
 
-An alternative method using [`FPDF.write_html`](HTML.md):
+An alternative method using [`FPDF.write_html`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html):
 
 ```python
 from fpdf import FPDF
@@ -117,7 +117,7 @@ There are some situations where a user wants to create
 an internal link to another page in the PDF document, but
 the page number is not known at the time of link creation.
 In this case, the link can be created using `pdf.add_link()`
-as before, and then later re-reference to a specific page using 
+as before, and then later re-reference to a specific page using
 `pdf.set_link()`. In this example our goal is to link to a
 page that occurs after a section with a variable
 amount of text, potentially occupying multiple pages:
@@ -161,7 +161,7 @@ Other methods can also insert internal links:
 
 * [FPDF.multi_cell](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.multi_cell) using `link=` **or** `markdown=True` and this syntax: `[link text](page number)`
 * [FPDF.link](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.link)
-* [FPDF.write_html](HTML.md) using anchor tags: `link text`
+* [FPDF.write_html](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html) using anchor tags: `link text`
 
 The unit tests `test_internal_links()` in [test_links.py](https://github.com/py-pdf/fpdf2/blob/master/test/test_links.py) provides examples for all of those methods.
 
@@ -184,7 +184,7 @@ Other methods can also insert internal links:
 
 * [FPDF.multi_cell](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.multi_cell) using `link=` **or** `markdown=True` and this syntax: `[link text](other_doc.pdf)`
 * [FPDF.link](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.link)
-* [FPDF.write_html](HTML.md) using anchor tags: `link text`
+* [FPDF.write_html](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html) using anchor tags: `link text`
 
 The unit test `test_link_to_other_document()` in [test_links.py](https://github.com/py-pdf/fpdf2/blob/master/test/test_links.py) provides examples for all of those methods.
 
diff --git a/docs/Tables.md b/docs/Tables.md
index 0d13dbd24..f4f13e473 100644
--- a/docs/Tables.md
+++ b/docs/Tables.md
@@ -519,26 +519,26 @@ with pdf.table(text_align="CENTER") as table:
     row = table.row()
     row.cell("A1", colspan=2, rowspan=3)
     row.cell("C1", colspan=2)
-    
+
     row = table.row()
     row.cell("C2", colspan=2, rowspan=2)
-    
+
     row = table.row()
     # all columns of this row are spanned by previous rows
-    
+
     row = table.row()
     row.cell("A4", colspan=4)
-    
+
     row = table.row()
     row.cell("A5", colspan=2)
     row.cell("C5")
     row.cell("D5")
-    
+
     row = table.row()
     row.cell("A6")
     row.cell("B6", colspan=2, rowspan=2)
     row.cell("D6", rowspan=2)
-    
+
     row = table.row()
     row.cell("A7")
 ...
@@ -600,7 +600,7 @@ We have dedicated pages about those topics:
 
 ## Using write_html
 
-Tables can also be defined in HTML using [`FPDF.write_html`](HTML.md).
+Tables can also be defined in HTML using [`FPDF.write_html`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.write_html).
 With the same `data` as above, and column widths defined as percent of the effective width:
 
 ```python
diff --git a/docs/Text.md b/docs/Text.md
index 8f9a0dc2d..0fd6e18fb 100644
--- a/docs/Text.md
+++ b/docs/Text.md
@@ -14,10 +14,10 @@ There are several ways in fpdf to add text to a PDF document, each of which come
 
 ## Flowable Text Regions
 
-Text regions allow to insert flowing text into a predefined region on the page. It is possible to change the formatting and even the font within paragraphs, which will still be aligned as one text block. 
-The currently implemented type of text regions is [text_columns()](TextColumns.md), which defines one or several columns that can be filled sequentially or height-balanced.
+Text regions allow to insert flowing text into a predefined region on the page. It is possible to change the formatting and even the font within paragraphs, which will still be aligned as one text block.
+The currently implemented type of text regions is [text_columns()](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.text_columns), which defines one or several columns that can be filled sequentially or height-balanced.
 
-## Typography and Language Specific Concepts 
+## Typography and Language Specific Concepts
 ### Supported Features
 With supporting Unicode fonts, `fpdf2` should handle the following text shaping features correctly. More details can be found in [TextShaping](TextShaping.md).