PHPackages                             klement-alexander/p7m-extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. klement-alexander/p7m-extractor

ActiveLibrary

klement-alexander/p7m-extractor
===============================

A simple class that allows to extract the original file from a signed p7m file. All Credits to Filippo Toso. I only made 1 small change

v1.1.1(6y ago)026MITPHPPHP ^7.0

Since Jan 7Pushed 5y agoCompare

[ Source](https://github.com/AlexanderKlement/p7m-extractor)[ Packagist](https://packagist.org/packages/klement-alexander/p7m-extractor)[ RSS](/packages/klement-alexander-p7m-extractor/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

P7M Extractor
=============

[](#p7m-extractor)

A simple class that allows to extract the original file from a signed p7m file.

Added a secondary function in case the original function fails.

Requirements
------------

[](#requirements)

- PHP 7.0+
- Symphony Prcess 3.3 or 4.0+

Requirements
------------

[](#requirements-1)

Behind the scenes this package leverages [openssl](https://it.wikipedia.org/wiki/OpenSSL). You can verify if the binary installed on your system by issueing this command:

```
which openssl
```

If it is installed it will return the path to the binary.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer klement-alexander/p7m-extractor
```

Usage
-----

[](#usage)

Extracting text from a pdf is easy. P7M::extract('test.pdf.p7m', 'test.pdf', 'C:/Program Files/OpenSSL-Win64/bin/openssl.exe')

```
use FilippoToso\P7MExtractor\P7M;

$success = (new P7M())
    ->setSource('source.pdf.p7m')
    ->setDestination('destination.pdf')
    ->save();
```

Or easier:

```
use FilippoToso\P7MExtractor\P7M;

$success = P7M::convert('source.pdf.p7m', 'destination.pdf');
```

By default the package will assume that the `openssl` command is located at `/usr/bin/openssl`. If it is located elsewhere pass its binary path to constructor

```
use FilippoToso\P7MExtractor\P7M;

$success = (new P7M('/custom/path/to/openssl'))
    ->setSource('source.pdf.p7m')
    ->setDestination('destination.pdf')
    ->save();
```

or as the last parameter to the `extract` static method:

```
$success = P7M::convert('source.pdf.p7m', 'destination.pdf', '/custom/path/to/openssl');
```

If you want to get the content as a string instead of saving it to a file you can use the get() method or the extract() static method.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~114 days

Total

5

Last Release

2223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5770b735b934cddf652657ac2a7bedb3b27e4346a632afe335987317a76c8c1?d=identicon)[alexander.klement](/maintainers/alexander.klement)

---

Top Contributors

[![filippotoso](https://avatars.githubusercontent.com/u/26958813?v=4)](https://github.com/filippotoso "filippotoso (5 commits)")

### Embed Badge

![Health badge](/badges/klement-alexander-p7m-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/klement-alexander-p7m-extractor/health.svg)](https://phpackages.com/packages/klement-alexander-p7m-extractor)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[illuminate/process

The Illuminate Process package.

44699.5k65](/packages/illuminate-process)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
