=== EnConvert URL to PDF ===
Contributors: enconvert
Tags: pdf, url to pdf, webpage, document, converter
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a URL-to-PDF converter to any WordPress page or post via shortcode. Powered by the EnConvert API.

== Description ==

Add a polished URL-to-PDF converter to any WordPress page in seconds. Visitors paste a URL, click Convert, and download a high-fidelity PDF. The plugin renders a native form on your site and sends the URL directly to the EnConvert API for conversion. No iframe, no extra tracking — just a clean form on your page.

**How it works:**

1. [Create a free EnConvert account](https://enconvert.com/auth?mode=signup "Sign up for EnConvert").
2. Generate a public API key (`pk_*`) on your [EnConvert API keys page](https://enconvert.com/dashboard/api-keys "Open your EnConvert API keys").
3. Add your WordPress site's domain to the key's allowed-domains list.
4. Paste the key into the plugin settings.
5. Drop `[enconvert_url_to_pdf]` into any page, post, or shortcode block.

New to EnConvert? Visit the [EnConvert homepage](https://enconvert.com "EnConvert file conversion API"), or try this conversion online at [enconvert.com/convert/url-to-pdf](https://enconvert.com/convert/url-to-pdf "Try this conversion on EnConvert").

**What the API does behind the scenes:**

* Renders the target URL in a real headless browser at 1920×1080 viewport
* Auto-dismisses cookie banners (OneTrust, Cookiebot, Didomi, Usercentrics, generic)
* Triggers lazy-loaded images by scrolling the page
* Bypasses Content Security Policy and Trusted Types restrictions that would otherwise block conversion
* Returns a downloadable PDF in seconds

**Free tier available** — 100 monthly conversions, no credit card.

== Installation ==

1. Upload the `enconvert-url-to-pdf` folder to `/wp-content/plugins/`, or install via the Plugins menu.
2. Activate the plugin.
3. In your EnConvert dashboard, create a public API key (`pk_*`) and add this site's domain to its allowed-domains list (wildcards like `*.example.com` work).
4. In WordPress, go to **Settings → EnConvert URL to PDF** and paste the public key.
5. Insert `[enconvert_url_to_pdf]` in any page, post, or Shortcode block.

== Frequently Asked Questions ==

= Where do I get a public API key? =

Sign in at [enconvert.com](https://enconvert.com "Visit EnConvert") and go to **Dashboard → API Keys**. Create a key of type "Public" (`pk_*`). Public keys are designed for browser use and are restricted to the domains you list.

= Why a public key instead of a secret key? =

Secret keys (`sk_*`) cannot be used from a browser — the API rejects them with a 403 error. Public keys (`pk_*`) are safe to use in front-end code because they are restricted to a list of domains you control. If someone copies your key, it will not work on their site.

= Does this plugin send anything through my WordPress server? =

No. The visitor's browser sends the URL directly to `api.enconvert.com`. Your WordPress server never sees the URL or the resulting PDF.

= My conversion fails with "Domain not authorized". What now? =

The domain serving the WordPress page is not in the API key's allowed-domains list. Open your EnConvert dashboard, edit the key, and add your site's domain. Wildcards like `*.example.com` cover all subdomains.

= Does it work in the block editor? =

Yes. WordPress includes a built-in **Shortcode** block. Add it and paste `[enconvert_url_to_pdf]`. The form renders both inside the editor preview and on the published page.

= What are the conversion limits? =

The free tier includes 100 conversions per month. Paid tiers raise the limit; see [enconvert.com/pricing](https://enconvert.com/pricing "View EnConvert pricing").

= Does it work with multisite? =

Yes, but each site needs to activate the plugin and configure its own API key. The plugin has not been tested as a network-activated plugin.

== Screenshots ==

1. Settings page where you paste your public API key.
2. The Shortcode block in the WordPress block editor.
3. The live converter form on a published page, with the URL input and Convert button.

== Changelog ==

= 1.0.1 =
* Brand name updated to EnConvert.

= 1.0.0 =
* Initial release. Native form, public-key authentication, direct API calls.

== Upgrade Notice ==

= 1.0.1 =
Brand name updated to EnConvert. No action required.

= 1.0.0 =
Initial release.

== Third-Party Service ==

This plugin sends visitor input directly from the visitor's browser to the EnConvert API:

* `https://api.enconvert.com` — receives the URL and returns a presigned URL for the PDF download.

The visitor's browser sends an `X-API-Key` header containing the public API key configured in plugin settings. The API validates the key and the requesting domain (the page's origin) before accepting the conversion. Your WordPress server is not involved in the conversion request.

* Service: EnConvert — [https://enconvert.com](https://enconvert.com "Visit EnConvert")
* Terms of Service: [https://enconvert.com/terms](https://enconvert.com/terms "Read EnConvert Terms of Service")
* Privacy Policy: [https://enconvert.com/privacy](https://enconvert.com/privacy "Read EnConvert Privacy Policy")

By using this plugin, you and your visitors agree to EnConvert's Terms of Service and Privacy Policy.
