feat: add readme

This commit is contained in:
Thuc Pham
2024-05-13 15:57:09 +07:00
parent 025ca60b1c
commit a8c5203b02
+30
View File
@@ -0,0 +1,30 @@
React PDF viewer for LLM applications
## Installation
```bash
npm install pdf-viewer
```
## Usage
```jsx
import React from 'react';
import { PDFViewer, PdfFocusProvider } from 'pdf-viewer';
const file = {
id: 'sample-document',
url: 'https://d687lz8k56fia.cloudfront.net/sec-edgar-filings/0001045810/10-Q/0001045810-22-000147/filing-details.pdf',
};
function App() {
return (
<div className="AppContainer">
<PdfFocusProvider>
<PDFViewer file={file} />
</PdfFocusProvider>
</div>
);
}
```