PHPackages                             sawirricardo/laravel-api2pdf - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. sawirricardo/laravel-api2pdf

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

sawirricardo/laravel-api2pdf
============================

This is my package laravel-api2pdf

0.1.2(3y ago)31.5k1[3 PRs](https://github.com/sawirricardo/laravel-api2pdf/pulls)MITPHPPHP ^8.0

Since May 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sawirricardo/laravel-api2pdf)[ Packagist](https://packagist.org/packages/sawirricardo/laravel-api2pdf)[ Docs](https://github.com/sawirricardo/laravel-api2pdf)[ RSS](/packages/sawirricardo-laravel-api2pdf/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (14)Versions (14)Used By (0)

[Api2pdf](https://api2pdf.com) wrapper
======================================

[](#api2pdf-wrapper)

[![Laravel Api2Pdf](https://camo.githubusercontent.com/f8bf05786841add18025b06206c54716f46fe07fcfeb9db9ad5da154c3d91459/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f6c61726176656c2d617069327064662e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d73617769727269636172646f2532466c61726176656c2d61706932706466267061747465726e3d62616e6b4e6f7465267374796c653d7374796c655f31266465736372697074696f6e3d5573652b417069325064662b696e2b796f75722b4c61726176656c2b61707073266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/f8bf05786841add18025b06206c54716f46fe07fcfeb9db9ad5da154c3d91459/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f6c61726176656c2d617069327064662e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d73617769727269636172646f2532466c61726176656c2d61706932706466267061747465726e3d62616e6b4e6f7465267374796c653d7374796c655f31266465736372697074696f6e3d5573652b417069325064662b696e2b796f75722b4c61726176656c2b61707073266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f65905a4f0f716957dbcad80391ddba3c904196da118f587385af3f552dab0bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73617769727269636172646f2f6c61726176656c2d617069327064662e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)[![GitHub Tests Action Status](https://camo.githubusercontent.com/879e1c59f2b23eaa58cf441b9f88e8853ff29ec7d0e7140e8cef58fe377b7889/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73617769727269636172646f2f6c61726176656c2d617069327064662f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/sawirricardo/laravel-api2pdf/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/acc8b4a2d865d8eee64a26025a41d2fe6bb0b483255e3ca253a5d4de8fbef3e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73617769727269636172646f2f6c61726176656c2d617069327064662f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/sawirricardo/laravel-api2pdf/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/43a5a02c5e2edafb2290367a55ece68c70c606528331daf0b4004e3c0ad04921/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73617769727269636172646f2f6c61726176656c2d617069327064662e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sawirricardo/laravel-api2pdf)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/0088f8a8c978cb3f12e2052095051d0975ee3d23924367b2eeaea1e3bb2da789/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d617069327064662e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-api2pdf)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require sawirricardo/laravel-api2pdf
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-api2pdf-config"
```

This is the contents of the published config file:

```
return [
    'api_key'=> env('API2PDF_API_KEY'),
];
```

Usage
-----

[](#usage)

```
// @see https://github.com/Api2Pdf/api2pdf.php
$result = api2pdf()->chromeHtmlToPdf('Hello, World');
echo $result->getFile();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [sawirricardo](https://github.com/sawirricardo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.2% 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 ~0 days

Total

10

Last Release

1442d ago

PHP version history (2 changes)0.0.1PHP ^8.1

0.1.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/23599e5bcea6210e7c2aa6ab912ab4dc501ca63911cc8a99c46a7b4f57a658ad?d=identicon)[ricardosawir](/maintainers/ricardosawir)

---

Top Contributors

[![sawirricardo](https://avatars.githubusercontent.com/u/37329575?v=4)](https://github.com/sawirricardo "sawirricardo (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")

---

Tags

laravelsawirricardolaravel-api2pdf

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sawirricardo-laravel-api2pdf/health.svg)

```
[![Health](https://phpackages.com/badges/sawirricardo-laravel-api2pdf/health.svg)](https://phpackages.com/packages/sawirricardo-laravel-api2pdf)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

9963.4M12](/packages/spatie-laravel-pdf)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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