A React Native library for converting HTML strings into PDF documents directly on mobile devices.
react-native-html-to-pdf is a React Native library that converts HTML strings into PDF documents directly within mobile applications. It solves the need for generating printable content like reports or invoices on iOS and Android devices without relying on external services. The library provides customizable options for document dimensions, styling, and output formats.
React Native developers building mobile applications that require on-device PDF generation, such as apps for invoicing, reporting, or document creation.
Developers choose this library for its simplicity, platform-specific customization options, and seamless integration into React Native projects, eliminating the need for complex native modules or external PDF generation services.
Convert html strings to PDF documents using React Native
Offers a clean, promise-based API with minimal setup, as demonstrated in the straightforward usage example that requires just a few lines of code.
Provides iOS-specific padding and background color options, and Android-specific custom font support, allowing tailored PDF generation per platform directly from the README options table.
Enables saving PDFs to custom directories, generating base64 strings, and setting custom filenames, giving developers control over output storage and format.
Allows setting exact height and width in points for the PDF document, ensuring control over the final document size as shown in the options configuration.
On iOS, only the 'Documents' directory is accepted for custom paths, restricting file storage flexibility and potentially complicating file management.
The README explicitly warns that returning base64 strings is 'not recommended,' limiting reliable use for in-memory PDF data handling or real-time streaming.
Features like padding are iOS-only and custom fonts are Android-only, which can lead to fragmented development and testing efforts for truly cross-platform apps.
A <Hyperlink /> component for react-native that makes urls, fuzzy links, emails etc clickable
React Native 100% compatible CommonMark renderer
🔠 Responsive fontSize based on screen-size of the device in React-Native
Native file viewer for React Native. Preview any type of file supported by the mobile device.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.