PHPackages                             putuariepra/php-pdfstamper - 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. putuariepra/php-pdfstamper

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

putuariepra/php-pdfstamper
==========================

Add an image to PDF's pages

v1.1.2(4y ago)0369PHPPHP &gt;=5.6.0

Since Aug 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/putuariepra/php-pdfstamper)[ Packagist](https://packagist.org/packages/putuariepra/php-pdfstamper)[ RSS](/packages/putuariepra-php-pdfstamper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)DependenciesVersions (10)Used By (0)

PHP Pdfstamper: Add an image to PDF's pages
===========================================

[](#php-pdfstamper-add-an-image-to-pdfs-pages)

This package using [crossref/pdfstamp](https://gitlab.com/crossref/pdfstamp)

FunctionParamsDescriptionrender()To process adding an image to PDF's pages and get the outputsetStampUrl(url)url: stringAdd url redirection to the imagesetDpi(dpi)dpi: numericSet image's DPI. Default DPI is 300setLocation(x,y)x: numeric
 y: numericSet coordinate location of image in page. Default (x,y): 0,0setPage(page)page: numeric or array (e.g: \[1,4,5\])Set pages to add image. Multiple pages are allowed. Default: page 1setPageRange(range)range: array \[start,end\]
 (e.g: \[\[1,3\], \[5,7\]\])Set pages in range to add image. Multiple pages are allowed. Default: page 1overwrite()Overwrite the stamped image if already exists. Default: falsedisableValidation()Disable validation of PDF file (exists and must be pdf), image (exists and must be image format) and output directory (writeable)Examples
--------

[](#examples)

Standard usage

```
use PdfStamper\PdfStamper;

PdfStamper::stamp(
    '/dir/targetfile.pdf',
    '/dir/image.jpg'
)
->setLocation(40,40)
->overwrite()
->render();

```

Determine output directory

```
use PdfStamper\PdfStamper;

PdfStamper::stamp(
    '/dir/targetfile.pdf',
    '/dir/image.jpg',
    '/dir/output'
)
->setLocation(40,40)
->overwrite()
->render();

```

Set a page (e.g: page number 2)

```
use PdfStamper\PdfStamper;

PdfStamper::stamp(
    '/dir/targetfile.pdf',
    '/dir/image.jpg'
)
->setLocation(40,40)
->overwrite()
->setPage(2)
->render();

```

Set pages (e.g: pages 1, 3, and 4)

```
use PdfStamper\PdfStamper;

PdfStamper::stamp(
    '/dir/targetfile.pdf',
    '/dir/image.jpg'
)
->setLocation(40,40)
->overwrite()
->setPage([1,3,4])
->render();

```

Set pages using range (e.g: pages 1-3 and 6-8)

```
use PdfStamper\PdfStamper;

PdfStamper::stamp(
    '/dir/targetfile.pdf',
    '/dir/image.jpg'
)
->setLocation(40,40)
->overwrite()
->setPageRange([
  [1,3],
  [6,8]
])
->render();

```

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

[](#requirements)

- PHP: &gt;=5.6.0
- [JRE](https://www.java.com/)

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

[](#installation)

> This package can be installed either in native PHP or Framework such Laravel

Run composer require to install

```
composer require putuariepra/php-pdfstamper

```

Credit
------

[](#credit)

- [crossref](https://gitlab.com/crossref)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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 ~2 days

Total

9

Last Release

1724d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7818d9e762a084a5373d2c0169e2ff9591196e4acb4b96fd7dba4d051e2e0fb?d=identicon)[putuariepra](/maintainers/putuariepra)

---

Top Contributors

[![putuariepra](https://avatars.githubusercontent.com/u/12608555?v=4)](https://github.com/putuariepra "putuariepra (18 commits)")

### Embed Badge

![Health badge](/badges/putuariepra-php-pdfstamper/health.svg)

```
[![Health](https://phpackages.com/badges/putuariepra-php-pdfstamper/health.svg)](https://phpackages.com/packages/putuariepra-php-pdfstamper)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.2k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M100](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M128](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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