npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@naverpay/react-pdf

v0.3.4

Published

- 리액트 컴포넌트 기반으로 만들어진 pdf 뷰어 입니다. 별다른 설정 없이, IE 11 환경을 지원합니다.

Downloads

493

Readme

@naverpay/react-pdf

  • 리액트 컴포넌트 기반으로 만들어진 pdf 뷰어 입니다. 별다른 설정 없이, IE 11 환경을 지원합니다.

  • pdfjs-dist 하위 파일은 mozilla에서 제공하는 PDF parse 를 번들한 결과입니다.

    • ie 지원과 기기 내부 overriding 되어 강제로 변환된 폰트도 지원할 수 있도록 커스텀 되어 있습니다.

Installation

npm install @naverpay/react-pdf

Description

@naverpay/react-pdf 의 장점

자세한 개선사항은 여기 에서 확인할 수 있습니다.

성능 향상

  1. 한글을 고려한 렌더링 방식

    • 기존 react pdf 는 파싱 및 렌더링이 영어에 초점이 맞춰져 있습니다.
    • 한글의 경우, 한글자 씩 렌더링되고 있어, rendering 시점에 blocking이 자주 발생되곤 했습니다.
    • @naverpay/react-pdf 에서는 한글에 알맞도록 파싱 로직을 수정했습니다.
  2. non-blocking rendering

    • pdf rendering 시, requestAnimationFrame을 이용해 rendering에 의한 blocking이 발생되지 않도록 처리했습니다.
  3. lazy loading

    • 페이지 수가 많은 pdf를 불러오고 rendering을 하게 되면, 부하가 많이 생기는데, 이를 lazy-loading을 기본적으로 적용하여 최적화했습니다.

ie 지원

  • 별도의 설정 없이, ie 11을 지원합니다.

SSR 지원 (feat. NextJs)

  • 별도의 설정 없이, SSR을 지원하도록 구현했습니다.

기타 장점

  • pdfjs-dist를 내장하여, pdfjs-dist에서 pdf 파싱을 위한 worker setting이 불필요합니다.
  • pdf 내부의 한글 글자 클릭 시, custom 한 action을 사용할 수 있도록 추가했습니다.