Advanced

Troubleshooting

Common issues and solutions.

Solutions to common problems when using Nuxt PDF Kit.

PDF Fails to Load

Check the path:

<!-- Correct: from public/ folder -->
<NuxtPdfKit src="/document.pdf" />

<!-- Wrong -->
<NuxtPdfKit src="public/document.pdf" />

CORS issues: When loading from external URLs, ensure the server allows cross-origin requests.

Blurry Text

Try increasing the zoom level or use page-width zoom mode.

Slow Loading

Enable virtual scrolling for large documents:

<NuxtPdfKit 
  src="/large-document.pdf"
  :virtual-scroll="true"
  :virtual-scroll-threshold="10"
/>

SSR Errors

The PDF viewer is client-side only. If using custom wrappers, ensure they're also client-only:

<template>
  <ClientOnly>
    <YourWrapper>
      <NuxtPdfKit src="/document.pdf" />
    </YourWrapper>
  </ClientOnly>
</template>

Search Not Finding Text

  • Scanned PDFs: If the PDF is a scanned image, there's no text to search.
  • Case sensitivity: Toggle case sensitivity in search options.

The browser print preview relies on final rendered content. If your layout applies restrictive styles, the preview may appear blank or cut off.

  • Ensure pages finish rendering before calling window.print().
  • Avoid overlays that cover content (e.g. fixed modals) during print.
  • Make sure html, body allow overflow while printing.
assets/css/main.css
@media print {
  /* Allow full document flow */
  html, body {
    overflow: visible !important;
    height: auto !important;
  }

  /* Hide viewer UI chrome if needed */
  .npk-viewer .npk-toolbar,
  .npk-viewer .npk-main,
  .npk-viewer .npk-container {
    display: none !important;
  }

  /* Show your print container */
  .npk-print-container {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

If preview still misbehaves, as a workaround you can open the PDF in a new tab and use the browser’s native print function.

Getting Help

  1. Check GitHub Issues
  2. Create a minimal reproduction
  3. Open a new issue with:
    • Nuxt PDF Kit version
    • Browser and OS
    • Steps to reproduce
    • Error messages
Copyright © 2026