Skip to content

Commit

Permalink
Merge pull request #35 from ilovepdf/develop
Browse files Browse the repository at this point in the history
v2.1.3
  • Loading branch information
teamcrombie authored Sep 6, 2024
2 parents e8f7d69 + fc26741 commit 0674918
Show file tree
Hide file tree
Showing 55 changed files with 511 additions and 298 deletions.
82 changes: 33 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,51 @@
=== PDF Compressor & Watermark - iLovePDF ===
Plugin Name: Image Compressor & Optimizer - iLovePDF
Version: 2.1.2
Author: iLovePDF
Author URI: https://www.ilovepdf.com/
Contributors: iLovePDF
Tags: compress, watermark, optimize, performance, pdf optimizer
Requires at least: 5.3
Tested up to: 6.5.5
Stable tag: 2.1.2
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
# PDF Compressor & Watermark - iLovePDF

Compress your PDF files and Stamp Images or text into PDF files. This is the Official iLovePDF plugin for Wordpress. You can optimize all your PDF and stamp them automatically as you do in ilovepdf.com.
**PDF Compressor & Watermark - iLovePDF** is the official iLovePDF plugin for WordPress. It allows you to automatically compress your PDF files and add watermarks, saving storage space and enhancing your PDF's security.

== Description ==
With seamless integration, you can optimize all PDFs in your Media Library and stamp them automatically—just like you do on [iLovePDF.com](https://www.ilovepdf.com/).

###How it works
### Key Features

The plugin has two modes of work, automatic or manual.
Compress PDF: Every time a PDF file is uploaded to your Media Library, is compressed by our iLovePDF API and saved in your WordPress site already optimized, saving you disk space. This feature can be disabled.
- **Automatic Compression:** PDFs are compressed upon upload using the iLovePDF API, saving up to 50% storage space without losing quality.
- **Watermarking:** Automatically add text or image watermarks to your PDFs upon upload to safeguard your files.
- **Manual & Bulk Actions:** Compress or add watermarks to existing PDFs individually or in bulk.
- **Easy to Use:** Configure it once, and the plugin handles the rest, automating PDF optimization for future uploads.

It can also compress all PDF already in your Media Library at once or compress PDF files one by one. The compression ratio depends on the PDF but on average you can save up to 50% of disk space occupied by PDF files without loosing quality.
## How It Works

Watermark PDF: Every time a PDF file is uploaded to your Media Library, is stamped by our iLovePDF API and saved in your WordPress. This feature can be disabled.
It can also stamp images or text in PDF already in your Media Library at once or stamp PDF files one by one.
### PDF Compression

- **Automatic:** Every time a PDF is uploaded, it gets compressed via iLovePDF API, reducing file size while maintaining quality. This feature can be toggled off if needed.
- **Manual:** Compress PDFs one by one or all at once from the Media Library. On average, compression can save up to 50% of the disk space.

###Bulk actions
### Watermarking PDFs

All tools can be done for an individual files or applied to all your existing files.
- **Automatic:** Add watermarks to PDFs upon upload. This feature can also be disabled if not required.
- **Manual:** Watermark PDFs individually or apply watermarks in bulk to existing files. You can choose between text or image watermarks.

###Automatic process
### Bulk Actions

All tools can be applied automatically when a PDF file is upload, so you don't need to apply any manual anymore.
Easily apply compression or watermarking actions to multiple files at once, streamlining your file management process. Bulk actions can be performed on all files in the Media Library with a single click.

== Installation ==
### Automatic Processing

From your Admin panel:
1. Visit Plugins > Add New.
2. Search for ‘ilovepdf’ and press the ‘Install Now’ button.
3. Activate the plugin from your Plugins page.
Set up the plugin to apply compression and watermarking automatically for all future PDF uploads, eliminating the need for manual intervention.

Manual:
1. Upload `ilove-pdf` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Create a free account in the plugin settings page, or use your existing one
4. Configure the plugin as you like
## Installation

Configure your iLovePDF Developer Account:
Install this plugin and go to Settings -> iLovePDF to create your iLovePDF Developer account (if you already registered previously on https://developer.ilovepdf.com you can login directly) and choose your Project, but by default it will be selected ‘Default Project’. A project is what defines which API keys will be used. If you need it, you can manage your projects in your iLovePDF developer account. With your iLovePDF API Free account you get 250 free PDF files to process per month. If you need more you can purchase them
### From the WordPress Admin Panel:
1. Navigate to **Plugins > Add New**.
2. Search for "iLovePDF" and click **Install Now**.
3. After installation, activate the plugin from your **Plugins page.**

### Manual Installation:
1. Upload the `ilovepdf` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to the plugin settings page and create a free account or log in with an existing iLoveAPI account.
4. Configure the settings as per your requirements.

== Frequently Asked Questions ==
### iLoveAPI Developer Account Setup:
- Go to **Register** to create an iLoveAPI Developer account (or use an existing one if you've already registered at [iLoveAPI Developer](https://iloveapi.com)).
- Select a project, which will determine which API keys to use. The "Default Project" is selected by default.
- Free accounts can process up to **2500 credits per month**. If more is needed, additional processing can be purchased.

###Do I need a iLovePDF account?

Yes, you need a `developer` account. It can be created easily from your Wordpress, or you can use your existing one.

###Is this service free?

With a free account you can process up to 250 files each month. If you need more, you can upgrade your account.

###What happens when the limit is reached?

We will send you an email before limit is reached. When limit is reached, no more PDF files will be processed. But remember each month, 250 files are free, so in next month you will be able to process more files again!
55 changes: 30 additions & 25 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
=== PDF Compressor & Watermark - iLovePDF ===
Plugin Name: Image Compressor & Optimizer - iLovePDF
Version: 2.1.2
Version: 2.1.3
Author: iLovePDF
Author URI: https://www.ilovepdf.com/
Contributors: iLovePDF
Tags: compress, watermark, optimize, performance, pdf optimizer
Requires at least: 5.3
Tested up to: 6.5.5
Stable tag: 2.1.2
Tested up to: 6.6.1
Stable tag: 2.1.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A wordpress plugin by iLovePDF.
Optimize and protect your PDFs with automatic compression and watermarking. Save space and secure your documents effortlessly.

== Description ==

Expand Down Expand Up @@ -40,65 +40,70 @@ All tools can be applied automatically when a PDF file is upload, so you don't n

From your Admin panel:
1. Visit Plugins > Add New.
2. Search for ‘ilovepdf’ and press the Install Now button.
2. Search for **ilovePDF** and press the **Install Now** button.
3. Activate the plugin from your Plugins page.

Manual:
1. Upload `ilove-pdf` to the `/wp-content/plugins/` directory
1. Upload `ilovepdf` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Create a free account in the plugin settings page, or use your existing one
4. Configure the plugin as you like

== Configure your iLovePDF Developer Account ==
== Configure your iLoveAPI Developer Account ==

Install this plugin and go to Settings -> iLovePDF to create your iLovePDF Developer account (if you already registered previously on https://developer.ilovepdf.com you can login directly) and choose your Project, but by default it will be selected Default Project. A project is what defines which API keys will be used. If you need it, you can manage your projects in your iLovePDF developer account. With your iLovePDF API Free account you get 250 free PDF files to process per month. If you need more you can purchase them
Install this plugin and go to `Settings -> iLovePDF` to create your iLoveAPI Developer account (if you already registered previously on [iLoveAPI Developer](https://iloveapi.com) you can login directly) and choose your Project, but by default it will be selected **Default Project**. A project is what defines which API keys will be used. If you need it, you can manage your projects in your iLoveAPI developer account. With your iLoveAPI Free account you get 2500 free credits to process per month. If you need more you can purchase them

By going to Settings -> iLovePDF -> Compress PDF you can set the compression level you prefer to optimize your PDF files. We strongly recommend you to use ‘Recommended Compression’ which offers the perfect balance between compression and quality. In this section you can disable the auto compression of new uploaded PDF files in your Media Library.
By going to `Settings -> iLovePDF -> Compress PDF` you can set the compression level you prefer to optimize your PDF files. We strongly recommend you to use ‘Recommended Compression’ which offers the perfect balance between compression and quality. In this section you can disable the auto compression of new uploaded PDF files in your Media Library.

By going to Settings -> iLovePDF -> Watermark PDF you can set many options on what to stamp and how into your PDF files. In this section you can disable the auto stamping of new uploaded PDF files in your Media Library.
By going to `Settings -> iLovePDF -> Watermark PDF` you can set many options on what to stamp and how into your PDF files. In this section you can disable the auto stamping of new uploaded PDF files in your Media Library.

To Compress or Stamp PDF files that are already in your Media Library go to Media -> iLovePDF -> Compress PDF or Media -> iLovePDF -> Watermark
To Compress or Stamp PDF files that are already in your Media Library go to `Media -> iLovePDF -> Compress PDF or Media -> iLovePDF -> Watermark`

== Frequently Asked Questions ==

= Do I need a iLovePDF account? =
= Do I need a iLoveAPI account? =

Yes, you need a `developer` account. It can be created easily from your Wordpress, or you can use your existing one.

= Is this service free? =

With a free account you can process up to 250 files each month. If you need more, you can upgrade your account.
With a free account you can process up to 2500 credits each month. If you need more, you can upgrade your account.

= What happens when the limit is reatched? =

We will send you an email before limit is reached. When limit is reached, no more PDF files will be processed. But remember each month, 250 files are free, so in next month you will be able to process more files again!
We will send you an email before limit is reached. When limit is reached, no more PDF files will be processed. But remember each month, 2500 credits are free, so in next month you will be able to process more files again!

== Screenshots ==

1. Create an account or login.
2. Configure your pluggin
3. Bulk actions with existing files
4. PDF actions
2. Configure Compress PDF.
3. Configure Watermark PDF.

== Changelog ==

== 2.1.2 ==
= 2.1.3 =
Improved
* Update Libraries.
* Improved readme texts.
* Improved texts when a credential problem occurs.

= 2.1.2 =
Improved
* Update Libraries.
* Now IlovePDF will use credits to process the files.

Fixed
* A problem was solved with the option to create backup, where in some cases the option was not stored in the database.

== 2.1.1 ==
= 2.1.1 =
Improved
* Update Libraries.

Fixed
* Fixed an issue when activating the plugin for the first time. Default settings now load correctly.
* Library was included internally. This will improve file loading and possible CDN blocking in some countries.

== 2.1.0 ==
= 2.1.0 =
Added
* New Backup option added in General Settings. Now the backup works for all tools.
* Regenerate thumbnails when wattermark is applied.
Expand All @@ -114,25 +119,25 @@ Improved
Fixed
* In some cases, when a user logged in, they could get a PHP error or warning.

== 2.0.5 ==
= 2.0.5 =
Improved
* Update Libraries.
* Assets.

== 2.0.4 ==
= 2.0.4 =
Fixed
* Compatibility issue with the Woocommerce plugin.

== 2.0.3 ==
= 2.0.3 =
Fixed
* Specify minimum version of PHP for dependencies.

== 2.0.2 ==
= 2.0.2 =
Added
* Improved class loading.
* Update library ilovepdf to v1.2.2

== 2.0.1 ==
= 2.0.1 =
Changed
* Remove Function Upload duplicate. Caused an error loading pdf files.

Expand Down
6 changes: 3 additions & 3 deletions admin/functions-compress.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ function ilove_pdf_compress_pdf( $id_file, $auto = false, $bulk = false ) {

$html = 'error_auth';

if ( $bulk ) {
if ( $bulk || $auto ) {
$html = 'error_auth';
}

if ( $auto ) {
$html = 'error_auth';
if ( 'Unauthorized (Key may not be empty)' === $e->getMessage() ) {
$html = 'Check your credentials in the plugin settings page. If you recently deleted a project in your iloveapi account, try switching to another project to correctly save your API Keys.';
}

// Uploading files errors
Expand Down
2 changes: 1 addition & 1 deletion ilove-pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: iLovePDF
* Plugin URI: https://iloveapi.com/
* Description: Compress your PDF files and Stamp Images or text into PDF files. This is the Official iLovePDF plugin for WordPress. You can optimize all your PDF and stamp them automatically as you do in ilovepdf.com.
* Version: 2.1.2
* Version: 2.1.3
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: ILovePDF
Expand Down
2 changes: 1 addition & 1 deletion includes/Ilove_Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Ilove_Pdf {
public function __construct() {

$this->plugin_name = 'ilove-pdf';
$this->version = 'wp.2.1.2';
$this->version = 'wp.2.1.3';

$this->load_dependencies();
$this->set_locale();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ilovepdf/ilovepdf-wp",
"name": "@ilovepdf/ilovepdf-wp",
"version": "1.0.0",
"description": "Compress your PDF files and Stamp Images or text into PDF files. This is the Official iLovePDF plugin for WordPress. You can optimize all your PDF and stamp them automatically as you do in ilovepdf.com.",
"main": "index.js",
Expand All @@ -16,6 +16,6 @@
"gulp-sass": "^5.1.0",
"gulp-uglify": "^3.0.2",
"merge-stream": "^2.0.0",
"sass": "^1.77.7"
"sass": "^1.78"
}
}
Loading

0 comments on commit 0674918

Please sign in to comment.