Skip to content

Commit

Permalink
Update docs to use pageCount instead of countPages
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Tsukanov committed Mar 29, 2023
1 parent 1c6c735 commit e9fcecd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docs/Customization-CustomRender-HeaderFooter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _Event parameter options:_
`DrawCanvas.drawText()`
`DrawCanvas.drawImage()`
`DrawCanvas.pageNumber`
`DrawCanvas.countPages`
`DrawCanvas.pageCount`

<a id="handle-events"></a>
## Handle events
Expand Down Expand Up @@ -151,8 +151,8 @@ survey.onRenderHeader.add(function (survey, canvas) {

You can add page numbering information into a document's headers/footers. Use the `DrawCanvas` object's specific properties to obtain page-related information.

[countPages](https://surveyjs.io/Documentation/Pdf-Export?id=drawcanvas#countPages) property
`countPages: number`
[pageCount](https://surveyjs.io/pdf-generator/documentation/api-reference/drawcanvas#pageCount) property
`pageCount: number`
Gets the total count of pages in the PDF document.

[pageNumber](https://surveyjs.io/Documentation/Pdf-Export?id=drawcanvas#pageNumber) property
Expand All @@ -164,7 +164,7 @@ Example:
```javascript
survey.onRenderHeader.add(function (survey, canvas) {
canvas.drawText({
text: canvas.pageNumber + "/" + canvas.countPages
text: canvas.pageNumber + "/" + canvas.pageCount
});
});
```
Expand Down Expand Up @@ -201,7 +201,7 @@ Example:
```javascript
survey.onRenderFooter.add(function (survey, canvas) {
canvas.drawText({
text: canvas.pageNumber + "/" + canvas.countPages,
text: canvas.pageNumber + "/" + canvas.pageCount,
horizontalAlign: "right",
verticalAlign: "bottom",
margins: {
Expand Down
2 changes: 1 addition & 1 deletion examples/jspdf/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9fcecd

Please sign in to comment.