Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Add this line to your application's Gemfile:
gem 'pludoni-pdfutils'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pludoni-pdfutils
requires ghostscript installed.
Conversion of document formats (docx etc.) requires soffice installed
All method take either ActiveStorage::Blob or File/Tempfile as argument and return a Tempfile/File
# compresses the given file if larger than given max_size
# @returns [Pludoni::Pdfutils::FileWrapper]
Pludoni::Pdfutils.compress_if_large(file, max_size: 5.megabytes)
# converts all images to pdf (keep pdf) and joins them if there are more than max_files
# @param blobs [Array<ActiveStorage::Blob>]
# @param max_files [Integer] keep max_files - 1 files, and join the rest
# @param max_size [Integer] in bytes Convert individual file if larger than max_size
# @returns [Array<Pludoni::Pdfutils::FileWrapper>]
Pludoni::Pdfutils.convert_all_to_pdf_and_join_max_size(blobs, max_files: 3, max_size: 5.megabytes)
Individual classes:
# jpg
tempfile = Pludoni::Pdfutils::ConvertImageToPdf.new(image_file).run
# docx etc.
tempfile = Pludoni::Pdfutils::ConvertDocumentToPdf.new(image_file).run
tempfile = Pludoni::Pdfutils::Joiner.new(job_application.uploads.map(&:blob)).run
# compresses with Ghostscript + /ebook Profile
tempfile = Pludoni::Pdfutils::Compressor.new(pdf_file).run
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that pludoni_pdfutils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.