New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-base64-to-pdf

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-base64-to-pdf - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

package.json
{
"name": "react-base64-to-pdf",
"version": "1.2.1",
"version": "1.2.2",
"description": "A React library for rendering Base64-encoded PDF files and providing download options.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -35,2 +35,5 @@ <!DOCTYPE html>

{/* Show PDF Preview */}
&lt;PDFPreview base64={base64Pdf} style={{width: 100vw, height : 100vh}} className="yourClassNameGoesHere"/&gt;
{/* Show PDF Information */}

@@ -60,11 +63,7 @@ &lt;PDFInfo base64={base64Pdf} /&gt;

<h3>PDFInfo</h3>
<p>Displays the information of the PDF file such as file size, PDF version, creation date, modification date, and creator tool.</p>
<p><strong>Description:</strong> This component displays essential information about the PDF file, including its file size, PDF version, creation date, modification date, and the tool used to create it.</p>
<div class="props">
<strong>Props</strong>
<strong>Props:</strong>
<ul>
<li><code>base64</code> (string): The Base64-encoded PDF string.</li>
<li><code>showDownloadButton</code> (boolean): (Optional) Whether to display the download button. Default is <code>false</code>.</li>
<li><code>showPreview</code> (boolean): (Optional) Whether to show the PDF preview. Default is <code>false</code>.</li>
<li><code>base64</code> (string): The Base64-encoded string of the PDF file.</li>
</ul>

@@ -74,9 +73,9 @@ </div>

<h3>PDFPreview</h3>
<p>Renders a preview of the PDF file.</p>
<p><strong>Description:</strong> This component renders a visual preview of the PDF file, allowing users to view its contents directly within the application.</p>
<div class="props">
<strong>Props</strong>
<strong>Props:</strong>
<ul>
<li><code>base64</code> (string): The Base64-encoded PDF string.</li>
<li><code>base64</code> (string): The Base64-encoded string of the PDF file.</li>
<li><code>style</code> (React.CSSProperties, optional): Custom styles for the preview component, specified as an object (e.g., <code>style={{...}}</code>).</li>
<li><code>className</code> (string, optional): Additional CSS class names for styling.</li>
</ul>

@@ -86,12 +85,10 @@ </div>

<h3>PDFDownloadButton</h3>
<p>Provides a button to download the PDF file.</p>
<p><strong>Description:</strong> This component provides a button that users can click to download the PDF file.</p>
<div class="props">
<strong>Props</strong>
<strong>Props:</strong>
<ul>
<li><code>base64</code> (string): The Base64-encoded PDF string.</li>
<li><code>downloadFileName</code> (string): (Optional) The name of the downloaded file. Default is <code>file.pdf</code>.</li>
<li><code>style</code> (React.CSSProperties): (Optional) Custom styles for the button.</li>
<li><code>className</code> (string): (Optional) Custom class names for additional styling.</li>
<li><code>base64</code> (string): The Base64-encoded string of the PDF file.</li>
<li><code>downloadFileName</code> (string, optional): The name for the downloaded file. If not provided, the default name is <code>file.pdf</code>.</li>
<li><code>style</code> (React.CSSProperties, optional): Custom styles for the button.</li>
<li><code>className</code> (string, optional): Additional CSS class names for further customization.</li>
</ul>

@@ -98,0 +95,0 @@ </div>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc