Skip to content

RPPages

The RPPages component is a required component responsible for rendering all visual layers of a PDF document. It manages the display and interaction of multiple PDF layers simultaneously.

Layer Type

The component handles several distinct PDF layers:

  • Canvas Layer: Display the visual elements, including images, graphics, and formatted text
  • Text Layer: Render the textual content of the PDF, enabling text selection and search
  • Annotation Layer: Show interactive elements such as links, comments and highlights

State Management

This component integrates with several context providers:

  • RPConfig: Access configuration settings like license key and PDF worker source
  • RPProvider: Manage the PDF document instance and page-related states like current page, page scale, and page rotation
  • RPDefaultLayout: Render the toolbar and handle its functionalities

RPPages must be used within the RPConfig and RPProvider components and does not require additional props as it receives all necessary data through the context providers.