From 3ad19aadcd0b5bdc15abd11d1369f0cadc14c981 Mon Sep 17 00:00:00 2001 From: Vadim Kononov Date: Thu, 2 Dec 2021 00:17:46 -0600 Subject: [PATCH] Improve README documentation and error messaging. --- README.md | 1 + lib/fillable-pdf.rb | 2 +- lib/fillable-pdf/version.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92a5434..10c115c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ FillablePDF is an extremely simple and lightweight utility that bridges iText an gem 'spring-watcher-listen' ``` +3. Read-only, write-protected or encrypted PDF files are currently not supported. ## Deployment with Heroku diff --git a/lib/fillable-pdf.rb b/lib/fillable-pdf.rb index 34c6313..425e8ce 100644 --- a/lib/fillable-pdf.rb +++ b/lib/fillable-pdf.rb @@ -21,7 +21,7 @@ def initialize(file_path) @pdf_form = ITEXT::PdfAcroForm.getAcroForm(@pdf_doc, true) @form_fields = @pdf_form.getFormFields rescue StandardError => e - raise "#{e.message} (input file may be corrupt, incompatible, or may not have any forms)" + raise "#{e.message} (Input file may be corrupt, incompatible, read-only, write-protected, encrypted, or may not have any form fields)" # rubocop:disable Layout/LineLength end end diff --git a/lib/fillable-pdf/version.rb b/lib/fillable-pdf/version.rb index 5b20281..78c23cc 100644 --- a/lib/fillable-pdf/version.rb +++ b/lib/fillable-pdf/version.rb @@ -1,3 +1,3 @@ class FillablePDF - VERSION = '0.9.2' + VERSION = '0.9.3' end