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

rescript-simple-pdf

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript-simple-pdf

simple pdf viewer

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ReScript Simple PDF

Installation

npm install rescript-simple-pdf rescript-webapi --save
Add `rescript-simple-pdf` and `rescript-webapi` as dependencies in your `bsconfig.json`:

Usage

Import pdf.js

<script src="https://cdn.bootcdn.net/ajax/libs/pdf.js/3.3.122/pdf.min.js"></script>

ReScript version

open Webapi.Dom
let el = document -> Document.querySelector("div") -> Belt.Option.getExn
let _ = RescriptSimplePdf.SPDF.make(
    ~url="https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf", 
    ~root=el
) 

JavaScript version

import { make } from "rescript-simple-pdf"
make("https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/examples/learning/helloworld.pdf", document.getElementById("root"))

See the examples folder.

Keywords

FAQs

Package last updated on 23 Mar 2023

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