Untitled

mail@pastecode.io avatar
unknown
javascript
2 months ago
592 B
4
Indexable
Never
/*
    YEU EM NHIEU VAI O
*/

// Anh dung Vite + React em ah
import { PDFDownloadLink, Document, Page, Text } from "@react-pdf/renderer";

const MyDoc = () => (
    <Document>
        <Page>
            <Text>Booj giao thoong vana taij</Text>
        </Page>
    </Document>
);
const App = () => (
    <div>
        <PDFDownloadLink document={<MyDoc />} fileName="somename.pdf">
            {({ blob, url, loading, error }) =>
                loading ? "Loading document..." : "Download now!"
            }
        </PDFDownloadLink>
    </div>
);
export default App;
Leave a Comment