Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This library provides a number of PDF::Reader based tools for use in testing PDF output. Presently, the primary purpose of this tool is to support the tests found in Prawn, a pure Ruby PDF generation library.
However, it may be useful to others, so we have made it available as a gem in its own right.
The recommended installation method is via Rubygems.
gem install pdf-inspector
Or put this in your Gemfile, if you use Bundler:
group :test do
gem 'pdf-inspector', require: "pdf/inspector"
end
Check for text in the generated PDF:
rendered_pdf = your_pdf_document.render
text_analysis = PDF::Inspector::Text.analyze(rendered_pdf)
text_analysis.strings # => ["foo"]
Note that strings
returns an array containing one string for each text drawing
operation in the PDF. As a result, sentences and paragraphs will often be
returned in fragments. To test for the presence of a complete sentence or a
longer string, join the array together with an operation like full_text = text_analysis.strings.join(" ")
.
Check number of pages
rendered_pdf = your_pdf_document.render
page_analysis = PDF::Inspector::Page.analyze(rendered_pdf)
page_analysis.pages.size # => 2
Matz’s terms for Ruby, GPLv2, or GPLv3. See LICENSE for details.
pdf-inspector is maintained as a dependency of Prawn, the ruby PDF generation library.
Any questions or feedback should be sent to the Prawn google group.
pdf-inspector was originally developed by Gregory Brown as part of the Prawn1 project. In 2010, Gregory officially handed the project off to the Prawn core team. Currently active maintainers include Brad Ediger, Daniel Nelson, James Healy, and Jonathan Greenberg.
You can find the full list of Github users who have at least one patch accepted to pdf-inspector on GitHub Contributors page.
FAQs
Unknown package
We found that pdf-inspector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.