https://github.com/baybreezy/nuxt-pdfmake
Easily generate PDFs in Nuxt.js using pdfmake
https://github.com/baybreezy/nuxt-pdfmake
nuxt nuxt-module nuxt-pdfmake pdfmake
Last synced: about 1 year ago
JSON representation
Easily generate PDFs in Nuxt.js using pdfmake
- Host: GitHub
- URL: https://github.com/baybreezy/nuxt-pdfmake
- Owner: BayBreezy
- License: mit
- Created: 2023-06-19T22:23:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-16T11:33:03.000Z (over 1 year ago)
- Last Synced: 2025-04-02T07:08:29.299Z (over 1 year ago)
- Topics: nuxt, nuxt-module, nuxt-pdfmake, pdfmake
- Language: Vue
- Homepage: https://nuxt-pdfmake.behonbaker.com/
- Size: 4.07 MB
- Stars: 42
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Nuxt PDFMake
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
Easily add pdfMake to your Nuxt 3 application.
- [✨ Release Notes](/CHANGELOG.md)
## Documentation
See the documentation here: [Nuxt PDFMake](https://nuxt-pdfmake.behonbaker.com/)
## Quick Setup
1. Add `nuxt-pdfmake` dependency to your project
```bash
# Using pnpm
pnpm add -D nuxt-pdfmake
# Using yarn
yarn add --dev nuxt-pdfmake
# Using npm
npm install --save-dev nuxt-pdfmake
```
2. Add `nuxt-pdfmake` to the `modules` section of `nuxt.config.ts`
```js
export default defineNuxtConfig({
modules: ["nuxt-pdfmake"],
});
```
That's it! You can now use Nuxt PDFMake in your Nuxt app ✨.
## Usage
You can use the `$pdfMake` variable inside a function
```ts
const { $pdfMake } = useNuxtApp();
```
Or you can use the `usePDFMake` composable
```ts
const pdfMake = usePDFMake();
```
## Development
```bash
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
```
[npm-version-src]: https://img.shields.io/npm/v/nuxt-pdfmake/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-pdfmake
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-pdfmake.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-pdfmake
[license-src]: https://img.shields.io/npm/l/nuxt-pdfmake.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/nuxt-pdfmake
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com