PHPackages                             risscsolutions/printformer-php-sdk - 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. [API Development](/categories/api)
4. /
5. risscsolutions/printformer-php-sdk

ActiveLibrary[API Development](/categories/api)

risscsolutions/printformer-php-sdk
==================================

SDK for the printformer API

v0.2.5(5mo ago)015.3k↓46.2%[1 issues](https://github.com/risscsolutions/printformer-php-sdk/issues)[9 PRs](https://github.com/risscsolutions/printformer-php-sdk/pulls)1MITPHPPHP ^8.0CI failing

Since Apr 18Pushed 1mo ago1 watchersCompare

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

READMEChangelog (3)Dependencies (7)Versions (22)Used By (1)

Printformer PHP SDK
===================

[](#printformer-php-sdk)

[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Latest Stable Version](https://camo.githubusercontent.com/46aeb0deccc20046039d0ae8cbfa620f4463b68b55e17e57f5ee80b6a12dff15/68747470733a2f2f706f7365722e707567782e6f72672f7269737363736f6c7574696f6e732f7072696e74666f726d65722d7068702d73646b2f762f737461626c652e737667)](https://packagist.org/packages/risscsolutions/printformer-php-sdk)[![Total Downloads](https://camo.githubusercontent.com/071e1917339596514920d03d9e1cf42b1ff0c6b0f048368216252be45a5ee4f4/68747470733a2f2f706f7365722e707567782e6f72672f7269737363736f6c7574696f6e732f7072696e74666f726d65722d7068702d73646b2f646f776e6c6f616473)](https://packagist.org/packages/risscsolutions/printformer-php-sdk)[![GitHub Workflow Status (event)](https://camo.githubusercontent.com/cf929ab528a3bcc49657f3fd200368c245a3f11ace51b444684551a59a882f25/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7269737363736f6c7574696f6e732f7072696e74666f726d65722d7068702d73646b2f504850556e697425323074657374733f6576656e743d70757368266c6162656c3d504850556e69742532307465737473)](https://github.com/risscsolutions/printformer-php-sdk/actions/workflows/tests.yml)[![GitHub Workflow Status (event)](https://camo.githubusercontent.com/46a2bd09e8bf95b3d8cb9148b1a066459a85d7f32a9a96f72f1131de6d7b11fe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7269737363736f6c7574696f6e732f7072696e74666f726d65722d7068702d73646b2f537461746963253230636f6465253230616e616c797369733f6576656e743d70757368266c6162656c3d537461746963253230636f6465253230616e616c79736973)](https://github.com/risscsolutions/printformer-php-sdk/actions/workflows/static%20code%20analysis.yml)

### [Documentation](https://risscsolutions.github.io/printformer-php-sdk/)

[](#documentation)

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

[](#installation)

```
composer require risscsolutions/printformer-php-sdk
```

Usage
-----

[](#usage)

### Create a new Instance of the printformer-SDK

[](#create-a-new-instance-of-the-printformer-sdk)

```
use Rissc\Printformer;

$config = [
    'base_uri' => 'YOUR printformer URL',
    'identifier' => 'YOUR TENANT IDENTIFIER',
    'api_key' => 'YOUR TENANT API KEY',
];

$printformer = new Printformer($config);
```

### Create a new User

[](#create-a-new-user)

```
$pfUser = $this->printformer->clientFactory()->user()->create([
    'first_name' => 'John',
    'last_name' => 'Doe',
    'locale' => 'en',
    'email' => 'john.doe@rissc.com',
]);
```

### Create a new Draft

[](#create-a-new-draft)

by passing an array to the DraftClient

```
$draftClient = $printformer->clientFactory()->draft();
$draft = $draftClient
    ->create([
        'templateIdentifier' => 'YOUR MASTER TEMPLATE IDENTIFIER',
        'user_identifier' => $pfUser->getIdentifier(),
        'intent' => 'customize'
    ]);
```

or with a fluid builder

```
$draftBuilder = $printformer->builderFactory()->draft();
$draft = $draftBuilder
    ->template('YOUR MASTER TEMPLATE IDENTIFIER')
    ->user($pfUser->getIdentifier())
    ->intent('customize')
    ->create();
```

### Create a URL to the Editor

[](#create-a-url-to-the-editor)

```
$url = (string)$printformer->urlGenerator()->editor()
        ->draft($draft->getIdentifier())
        ->callback('https://YOUR-CALLBACK-URL-HERE')
        ->callbackCancel('https://YOUR-CANCEL-CALLBACK-URL-HERE') // Optional, if omitted the callback URL is used
        ->callbackHalt('https://YOUR-HALT-CALLBACK-URL-HERE') // Optional, if omitted the callbackCancel URL is used
        ->user($pfUser->getIdentifier())
        ->step('preview') // Optional, if omitted the editor jumps to the last visited step
        ->locale('de') // Optional, sets the language of the editor interface
```

### Create a Print PDF

[](#create-a-print-pdf)

```
$printformer->clientFactory()->processing()->create(
    [$draft->getIdentifier(), $otherDraft->getIdentifier()],
    'https://YOUR-CALLBACK-URL-HERE'
);
```

### Create a URL to the Print PDF

[](#create-a-url-to-the-print-pdf)

```
(string)$printformer->urlGenerator()
->draftFiles()
->printFile($draft->getIdentifier())
->expiresAt((new \DateTimeImmutable())->modify('+1 hour'))
```

### Replicate a draft

[](#replicate-a-draft)

```
$draftClient = $printformer->clientFactory()->draft();
$draft = $draftClient
    ->replicate($draft, []);
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.1% 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 ~121 days

Recently: every ~240 days

Total

12

Last Release

158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f1dd43835fcc5422edcb6e294a9fd675f865bd8902ed0ce7fe9f37ebadb89f2?d=identicon)[risscsolutions](/maintainers/risscsolutions)

---

Top Contributors

[![MrMadClown](https://avatars.githubusercontent.com/u/12624410?v=4)](https://github.com/MrMadClown "MrMadClown (137 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (36 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (5 commits)")[![rissc](https://avatars.githubusercontent.com/u/20793479?v=4)](https://github.com/rissc "rissc (4 commits)")[![ntcgrgr](https://avatars.githubusercontent.com/u/18123977?v=4)](https://github.com/ntcgrgr "ntcgrgr (3 commits)")

---

Tags

printformerweb2print

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/risscsolutions-printformer-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/risscsolutions-printformer-php-sdk/health.svg)](https://phpackages.com/packages/risscsolutions-printformer-php-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

4684.7k2](/packages/fschmtt-keycloak-rest-api-client-php)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

3957.9k5](/packages/mvdnbrk-dhlparcel-php-api)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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