Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocklet/pdf

Package Overview
Dependencies
Maintainers
0
Versions
427
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocklet/pdf

blocklet pdf component

  • 2.0.143
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@blocklet/pdf

@blocklet/pdf is a package that integrates the react/pdf service to provide universal pdf capability for blocklets. For more information about react/pdf, refer to the official documentation.

Package Structure

The package is composed of both frontend and backend components. The frontend code resides in the index.js file

Development

Install In Blocklet

# You can use npm / yarn
pnpm add @blocklet/pdf

Install Dependencies

To install the required dependencies, run the following command:

pnpm i

Build Packages

To build the packages, execute the following command:

pnpm build

Build, Watch, and Run Development Server

For building, watching changes, and running the development server, use the following command:

pnpm run dev

Frontend Example

import { lazy } from 'react';

const PdfComponent = React.lazy(() =>
  // @ts-ignore
  import('@blocklet/pdf').then((module) => {
    return {
      default: module.PdfComponent,
    };
  })
);

---

<Box>
  <PdfComponent url={pdfUrl} maxHeight="60vh" />
</Box>;

License

This package is licensed under the MIT license.

Keywords

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

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.

Install

Related posts

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