Skip to content

Commit

Permalink
Minor changes in tutorials.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentmuller committed Aug 15, 2024
1 parent 5e6d17f commit d66ab9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## Unreleased

- Minor changes in tutorials.

## 2.0.6 - 2024-08-14

- Added `PdfSectorTrait` trait and the corresponding tutorial.
Expand Down
2 changes: 1 addition & 1 deletion doc/tuto_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion doc/tuto_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d66ab9c

Please sign in to comment.