diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb6cfb..68c7ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## Unreleased + +- Minor changes in tutorials. + ## 2.0.6 - 2024-08-14 - Added `PdfSectorTrait` trait and the corresponding tutorial. diff --git a/doc/tuto_3.md b/doc/tuto_3.md index e75e396..b241232 100644 --- a/doc/tuto_3.md +++ b/doc/tuto_3.md @@ -20,7 +20,7 @@ class CustomDocument extends PdfDocument // calculate width of title and position $title = $this->getTitle(); $width = $this->getStringWidth($title) + 6.0; - $this->setX((210.0 - $width) / 2.0); + $this->setX(($this->width - $width) / 2.0); // colors of frame, background and text $this->setDrawColor(0, 80, 180); $this->setFillColor(230, 230, 0); diff --git a/doc/tuto_4.md b/doc/tuto_4.md index c5cbeda..e4198ee 100644 --- a/doc/tuto_4.md +++ b/doc/tuto_4.md @@ -24,7 +24,7 @@ class CustomDocument extends PdfDocument $title = $this->getTitle(); $this->setFont(PdfFontName::ARIAL, PdfFontStyle::BOLD, 15); $width = $this->getStringWidth($title) + 6.0; - $this->setX((210.0 - $width) / 2); + $this->setX(($this->width - $width) / 2); $this->setDrawColor(0, 80, 180); $this->setFillColor(230, 230, 0); $this->setTextColor(220, 50, 50);