vue-print-it

A powerful Vue 3 plugin for printing components and elements with automatic style injection and optional bridge support
689
Install
npm install vue-print-it
Latest Version:0.1.1
Vue:3
License:MIT
Last Updated:Jun 5, 2026
Links: GitHub  ·  npm
Maintainer: naturaldevcr

Vue Print It

npm version npm downloads License: MIT TypeScript Vue 3

Vue 3 printing plugin for browser print windows, hidden iframe printing, print-specific CSS, asset readiness, and optional local bridge printing.

Install

npm install vue-print-it
pnpm add vue-print-it
yarn add vue-print-it

Quick Start

import { createApp } from 'vue'
import { createVuePrintIt } from 'vue-print-it'
import App from './App.vue'

createApp(App)
  .use(createVuePrintIt({
    preserveStyles: true,
    pageSize: 'A4',
    orientation: 'portrait',
    printCss: '@media print { .no-print { display: none; } }'
  }))
  .mount('#app')
<template>
  <section id="invoice">
    <h1>Invoice</h1>
    <p>This section will be printed.</p>
  </section>

  <button @click="$print('invoice')">Print</button>
</template>

Composable

<script setup lang="ts">
import { usePrint } from 'vue-print-it'

const { print } = usePrint()

async function printInvoice() {
  await print('invoice', {
    pageSize: 'A4',
    orientation: 'landscape',
    scale: 0.95
  })
}
</script>

Documentation

The full documentation now lives in the VitePress site under docs/:

Run the docs locally:

npm run docs:dev

Build the docs:

npm run docs:build

Development

npm ci
npm run typecheck
npm test
npm run build
npm run release:check

License

MIT

Related Packages

vue-plugin

Create Vue plugins compatible with SSR

1,049
vue-session

A simplistic session plugin for VueJS backed by SessionStorage

159,920 200
@mundoit-lib/plugin-vue-auth

Vue 3 plugin for authentication (OAuth password grant, token refresh, $auth/useA...

1,718 0
vue-error-controller

Vue plugin for a global error controller

416
vue-spinners

A vue js component library which contains multiple spinners from SpinKit

16,925 30

Version History

Version Released Vue License
0.1.1 ^3.0.0 MIT
0.1.0 ^3.0.0 MIT
0.0.1 ^3.0.0 MIT