=== PDF Rack - PDF Viewer, Document Manager & Embed PDF Files ===
Contributors: codersuraz
Tags: pdf viewer, embed pdf, pdf manager, document viewer, gutenberg-pdf
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The all-in-one PDF manager for WordPress — upload, organize, and embed PDF documents with a beautiful responsive viewer. Works with Gutenberg, Elementor & Shortcodes.

== Description ==

**Stop losing visitors to clunky PDF downloads.** PDF Rack lets you display PDFs directly on your WordPress pages — no iframes, no browser plugins, no external services. Just a clean, fast, mobile-friendly viewer your visitors will love.

Unlike the WordPress Media Library that buries PDFs alongside thousands of images and videos, PDF Rack gives you a **dedicated PDF dashboard** built for document management. Upload once, embed anywhere — in seconds.

### 🚀 Why site owners choose PDF Rack

* **Save time** — Upload, categorize, and find any PDF in seconds with built-in search and filters.
* **Better user experience** — Visitors read PDFs right on your page without leaving your site or installing anything.
* **Works everywhere** — Gutenberg block, Elementor widget, or a simple shortcode. Pick whatever fits your workflow.
* **Mobile-ready** — The viewer automatically adapts to any screen size so your content looks great on phones and tablets.

### 📋 Feature Highlights

* **Dedicated PDF Dashboard** — A focused admin panel just for your PDF documents, separate from the Media Library clutter.
* **Categories & Tags** — Organize documents with custom taxonomies for easy sorting and retrieval.
* **Quick Search & Filter** — Find any document instantly by name, category, or upload date.
* **Media Library Preview** — Preview PDF contents directly within the WordPress Media Library details view.
* **Auto-Generate Covers** — Generate and set a cover image for your PDFs on demand.
* **Responsive PDF Viewer** — Page navigation, zoom controls, and an optional download button — all in a sleek, lightweight viewer powered by Mozilla's PDF.js.
* **Gutenberg PDF Viewer Block** — Embed PDF viewer in Gutenberg editor.
* **Elementor Widget** — A dedicated widget for Elementor page builder users.
* **Shortcode Support** — Use `[pdf-rack id="123"]` in the Classic Editor or any text widget.
* **Lightweight & Fast** — No bloat. The viewer loads only on pages where you embed a PDF.

### 💎 Premium Features (Coming Soon)

* **Flipbook Viewer** — Realistic 3D page flipping effect for an immersive reading experience.
* **Lightbox Viewer** — Open PDFs in a stunning, distraction-free modal overlay.
* **Carousel Display** — Showcase multiple PDFs in a beautiful, swipeable carousel slider.
* **Secure PDF** — Protect your documents with passwords and prevent unauthorized downloads.
* **Watermarking** — Automatically add custom text or image watermarks to your PDFs.
* **Analytics** — Track views, downloads, and engagement metrics for your documents.

### 🎯 Perfect For

* Businesses sharing catalogs, brochures, or price lists.
* Educators & trainers publishing course materials and handouts.
* Real estate agents displaying property brochures and floor plans.
* Nonprofits sharing annual reports and newsletters.
* Any WordPress site that needs professional PDF document management.

### 📖 How It Works

1. Go to **PDF Rack → Add New** and upload your PDF.
2. Assign a category (optional) to keep things organized.
3. Embed it anywhere using the **Gutenberg block**, **Elementor widget**, or the auto-generated **shortcode**.

That's it — your visitors can now read the PDF directly on your site.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/pdf-rack`, or install directly from the WordPress plugin directory.
2. Activate through **Plugins → Installed Plugins**.
3. Navigate to the new **PDF Rack** menu in your admin sidebar to start uploading documents.

== Frequently Asked Questions ==

= Does this plugin modify my existing Media Library files? =
Not at all. PDF Rack stores its data separately. Your existing Media Library files remain completely untouched.

= Can I use this with the Classic Editor? =
Absolutely. Every uploaded PDF gets a unique shortcode (e.g., `[pdf-rack id="10"]`) that you can paste into the Classic Editor or any text widget.

= Is the PDF viewer mobile-friendly? =
Yes. The viewer is fully responsive and adapts to any screen width — phones, tablets, and desktops.

= Will it slow down my site? =
No. The PDF viewer scripts load **only** on pages where you embed a PDF, so the rest of your site stays fast.

= Does it support large PDF files? =
The plugin will load any PDF your server allows. For very large files (50 MB+), performance depends on your hosting `upload_max_filesize` setting and your visitor's connection speed.

= Do visitors need to install anything? =
No. The built-in viewer runs entirely in the browser — no plugins, extensions, or third-party apps required.

== Screenshots ==

1. **PDF Viewer in Action** — 
2. **View/Edit PDF Details** — 
3. **Gutenberg Block** — 
4. **PDF Rack Dashboard** — 

== Third Party Libraries ==

This plugin utilizes the following third-party libraries to provide its functionality:

* **PDF.js** (Mozilla) - https://github.com/mozilla/pdf.js (Apache License 2.0)
* **React** (Meta) - https://reactjs.org (MIT)
* **Lucide Icons** - https://lucide.dev (ISC)
* **Date-fns** - https://date-fns.org (MIT)

== Changelog ==
= 1.0.4 =
* Minor updates.

= 1.0.3 =
* New: Added PDF Rack Viewer Gutenberg Block.
* New: Added Light/Dark Mode and Position, dock/float options for Toolbar.
* Fix: Fixed the issue of PDF thumbnail not displaying in the admin dashboard.

= 1.0.2 =
* New: Added in-app documentation slideover for easier usage.
* New: Added keyboard shortcuts for PDF viewer navigation and zoom.
* New: Added custom background color support for shortcode.

= 1.0.1 =
* Added Quick View lightbox feature in the admin dashboard.

= 1.0.0 =
* Initial release.
* Dedicated PDF dashboard with upload, categorization, and search.
* Responsive frontend PDF viewer powered by PDF.js.
* Gutenberg block, Elementor widget, and shortcode embedding.
* Category and tag taxonomy support for document organization.