
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
reflex-pdf-viewer
Advanced tools
A powerful and easy-to-use PDF viewer component for Reflex applications. Built on top of react-pdf, it provides seamless PDF viewing capabilities with full control over navigation, zoom, and display options.
pip install reflex-pdf-viewer
import reflex as rx
from reflex_pdf_viewer import Document, Page
class State(rx.State):
current_page: int = 1
n_pages: int = 1
@rx.event
def load_success(self, info: dict):
self.n_pages = info.get("numPages", 1)
def index():
return rx.vstack(
rx.heading("Reflex pdf preview", size="8"),
Document.create(
Page.create(page_number=State.current_page),
file="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
on_load_success=State.load_success,
),
)
app = rx.App()
app.add_page(index)
Don't forget to add the frontend package to your rxconfig.py:
import reflex as rx
config = rx.Config(
app_name="your_app",
frontend_packages=[
"react-pdf@10.1.0", # Required for PDF viewing
],
)
If you encounter any issues or have questions:
Made with ❤️ for the Reflex community
Star ⭐ this repo if you find it useful!
FAQs
Reflex custom component pdf-viewer
We found that reflex-pdf-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.