Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
adobe_pdfservices_ruby
Advanced tools
This gem provides a Ruby wrapper for the Adobe PDF Services API. It allows you to perform various PDF operations, such as extracting content from PDFs, OCR, HTML to PDF, and document generation.
gem "adobe_pdfservices_ruby"
bundle install
The PdfServices::Client
class allows you to perform various PDF operations, such as extracting content from PDFs. The client supports real-time updates on the operation status and retrieves the resulting file upon completion. Below is an example of how to use the client to extract content from a PDF file:
require 'adobe_pdfservices_ruby'
# Initialize the client with your credentials
client = PdfServices::Client.new('your_client_id', 'your_client_secret')
# Path to the PDF file you want to extract content from
source_pdf = 'path/to/your/pdf/file.pdf'
# Set the options for your operation
options = { extract_elements: ['text', 'tables'] }
# Perform the operation with real-time status updates
client.extract_pdf(source_pdf, options) do |status, file|
if status == 'in progress'
puts "Current status: #{status}"
elsif status == 'done'
puts "Extraction complete! The resulting file is ready for download."
# Process or save the resulting file
File.open('extracted_result.pdf', 'w') { |f| f.write(file) }
else
puts "Current status: #{status}"
end
end
# Perform the operation and only retrieve the resulting file
file = client.extract_pdf(source_pdf, options)
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Work is in progress on getting the gem to support all of the operations available in the Adobe PDF Services API. Below is a list of the operations and their current support status:
The parameters for each method are listed in the Adobe PDF Services API documentation. The parameters are passed to the methods as a hash.
For most operations that rely on a file as the first parameter, this can either be the path to the file or a File object.
Bug reports and pull requests are welcome on GitHub at https://github.com/benterova/adobe_pdfservices_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Be good. code of conduct.
FAQs
Unknown package
We found that adobe_pdfservices_ruby demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.