Deprecated as of Novemeber 2024. Please use New Library(B_Block v2.0)

Simple Pdf Viewer Component

SimplePDFViewer Component Provides a simple Pdf Viewer For Single page as well as multi page pdf's. Can be setup as a pdf viewer as well as Carousal.

Props

PropertyTypeDescription
apiUrlstringUrl to PDF Document
maxWidthnumberWidth for viewer
isCarousalbooleanShow as a Carousal
pageMarginnumberMargin for pages

Usage

Here's an example of how to use the SimplePDFViewer component:

Functional Component
App.tsx
import { SimplePdfViewer } from "gbs-fwk-buildingblock";
 
export default function App() {
  return (
    <div>
      <SimplePdfViewer
        apiUrl="https://raw.githubusercontent.com/ananduremanan/Demo/main/The%20Three%20Little%20Pigs.pdf"
        isCarousal // Shows as Carousal
      />
    </div>
  );
}