=== 100Prints ===
Contributors: controcode
Tags: pdf, certificate, id card, document generator, gutenberg
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate personalized certificates, ID cards, tickets, badges, and other documents directly from your WordPress site using Gutenberg.

== Description ==

100Prints lets you add personalized document generation to your WordPress website using native Gutenberg blocks.

Visitors can enter their details, preview their personalized document, and download it directly from your website.

Create certificates, ID cards, event badges, membership cards, tickets, and other printable documents without manually preparing each document.

Design once. Generate thousands. Render documents directly in the visitor's browser.

= Key Features =

* **Native Gutenberg Blocks:** Add document generation to pages, posts, and custom post types using the WordPress Block Editor.
* **Browser-Side Rendering:** Documents are rendered directly in the visitor's browser using the bundled JavaScript rendering engine.
* **Smart Variable Mapping:** Populate document fields dynamically from WordPress data, URL parameters, visitor form inputs, system values, or static values.
* **Bundled Starter Templates:** Includes 5 ready-to-use starter templates for certificates, badges, ID cards, membership cards, and similar documents.
* **Generation History & Audit Logs:** Review generation records including status, format, template, timestamps, and other generation information.
* **Flexible Layout:** Form and document blocks can be placed independently so you can build custom document-generation pages.
* **Extensible Architecture:** Developers can register custom variable sources using PHP filters.

= 3rd-Party Service Disclosure =

100Prints can optionally connect to the **100PrintsWithMe Platform** to access and synchronize custom templates created on the 100Prints design platform.

* **Service Name:** 100Prints Cloud Platform
* **Service Domain:** https://api.100printswith.me and https://100printswith.me
* **Purpose:** Fetching cloud template definitions, validating the connected account, and synchronizing custom templates.
* **Terms of Service:** https://100printswith.me/terms
* **Privacy Policy:** https://100printswith.me/privacy

Connecting an account is optional. The plugin includes 5 bundled starter templates that can be used without connecting an external account.

== Bundled Starter Templates ==

1. **Professional Certificate of Achievement** - Great for online courses and training.
2. **Volunteer Appreciation Certificate** - Ideal for non-profits and community events.
3. **Event & Conference Badge** - Perfect for summits and workshops.
4. **Employee / Student ID Card** - Ideal for institutions.
5. **VIP Membership Card** - Great for clubs and membership programs.

== Dynamic Variable Sources ==

Document fields can be populated dynamically from:

* Current User - Name, Email, Display Name, Registered Date
* Post / Page Data - Post Title, ID, Date, Author
* Site Information - Site Title, Tagline, URL
* System Values - Current Date, Current Time
* URL Query Parameters
* Visitor Form Inputs - Custom fields entered by visitors on the frontend
* Static Text Values

== Installation ==

1. Install 100Prints from the WordPress Plugins screen, or upload the `100prints` plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen.
3. Open **100Prints** from the WordPress admin menu.
4. Choose a starter template or connect your 100PrintsWithMe account to access custom templates.
5. Add the **100Prints Document** and **100Prints Form** blocks to a page, post, or custom post type.
6. Configure your template, variables, and visitor inputs.
7. Publish the page so visitors can generate and download personalized documents.

== Customization ==

100Prints supports Gutenberg's native styling controls and custom CSS classes for advanced customization.

Common CSS selectors include:

* `.wp-block-hundredprints-document`
* `.hundredp-document-card`
* `.hundredp-button-group`
* `.hundredp-download-btn`
* `.hundredp-preview-btn`
* `.hundredp-manual-inputs-form`
* `.hundredp-manual-field`
* `.hundredp-manual-input-field`

The plugin also exposes CSS custom properties for advanced theme customization, including:

* `--hundredp-accent`
* `--hundredp-accent-hover`
* `--hundredp-surface`
* `--hundredp-text`
* `--hundredp-muted`

For complete styling examples and customization guidance:

https://100printswith.me/docs/wordpress/styling

== Frequently Asked Questions ==

= Do I need an account to use 100Prints? =

No account is required for the bundled starter templates. Visitors can generate and download personalized documents without creating a WordPress account.

A 100PrintsWithMe account can optionally be connected to access custom templates created on the 100Prints design platform.

= Can anonymous visitors download documents? =

Yes. 100Prints supports public document-generation pages where visitors can enter their information and generate or download personalized documents without logging into WordPress.

= How are PDFs generated without slowing down my server? =

100Prints renders supported documents in the visitor's browser using the bundled JavaScript rendering engine. This avoids server-side PDF rendering for the document generation workflow.

= Is user data kept private? =

Document rendering takes place in the visitor's browser. Personal data used to populate document fields is not sent to external servers for document rendering.

Depending on the site's configuration, generation metadata such as request status, template information, or visitor IP address may be recorded for generation history and abuse prevention.

= Can I use custom templates? =

Yes. Create custom templates on the 100PrintsWithMe platform, then connect your account using an API key to access those templates from WordPress.

== Source Code and Build Process ==

The full human-readable source code and build tools for this plugin are publicly available at:

https://github.com/Controcode/100printswithme-wordpress-plugin

The repository contains the source files and build configuration used to generate the production assets included in this plugin.

To rebuild the production assets:

1. Install Node.js 18 or later and npm.
2. Clone the repository.
3. Run `npm install`.
4. Run `npm run build`.

The build process uses `@wordpress/scripts` to compile the source files into production assets in the `build/` directory.

= Third-Party Bundled Assets =

* **Konva** - MIT License - https://github.com/konvajs/konva
* **jsPDF** - MIT License - https://github.com/parallax/jsPDF
* **Phosphor Icons** - MIT License - https://github.com/phosphor-icons/phosphor-icons
* **Plus Jakarta Sans** - SIL Open Font License 1.1 - https://github.com/google/fonts

== Screenshots ==

1. Browse starter and custom document templates from the 100Prints Template Library.
2. Create and customize document templates on 100PrintsWithMe, then use them in WordPress.
3. Map document variables to WordPress data and visitor inputs from the Gutenberg editor.
4. Configure the document block, preview the template, and let visitors download personalized documents.

== Changelog ==

= 1.0.1 =
* Initial release.
* Added pre-signed HMAC authentication for protected REST API requests.
* Added five bundled starter templates.
* Added native Gutenberg Document and Form blocks.
* Added browser-side document rendering and download support.
* Added dynamic variable mapping from WordPress data and visitor inputs.

== Upgrade Notice ==

= 1.0.1 =
Initial release of 100Prints for WordPress.