Skip to content

pageNumber, totalPages not working in render function in <Text> #931

Description

@kirylh

const PdfDocument = (props) => {
return (




Section #1


Section #2



Just a text

<Text style={styles.pageNumber} render={({ pageNumber, totalPages }) => ${pageNumber} / ${totalPages}} fixed />


)
}

export default PdfDocument;

Paging is not showing in generated pdf document:

          <PDFDownloadLink document={<PdfDocument />} fileName={`somename${Math.floor(Math.random() * 1000)}.pdf`}>
            {({ blob, url, loading, error }) => (loading ? 'Loading document...' : 'Download now!')}
          </PDFDownloadLink>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions