PHPackages                             gafhyb/pandoc-php - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. gafhyb/pandoc-php

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

gafhyb/pandoc-php
=================

v1.0.2(9y ago)03271MITPHP

Since Jan 7Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

Pandoc PHP
==========

[](#pandoc-php)

Pandoc PHP is a naive wrapper for the Pandoc command. Pandoc is a Haskell program that allows you to convert documents from one format to another. For more information on Pandoc you can look [here](https://github.com/jgm/pandoc).

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

[](#installation)

First you will need [Pandoc](https://github.com/jgm/pandoc). The easiest method to get this is with a quick `cabal install pandoc` providing you have Haskell installed. (apt-get also supports installation of Pandoc using `apt-get install pandoc`you just need to make sure you have at least version 1.10 for this library).

The recommended method to installing Pandoc PHP is with [composer](http://getcomposer.org)

```
{
    "require": {
        "gafhyb/pandoc-php": "~1.0"
    }
}
```

Once installed you can start converting your content to other formats like:

```
$pandoc = new Pandoc();
$html = $pandoc->convert("#Hello Pandoc", "markdown_github", "html");
// $html == "Hello Pandoc"
```

For a full listing of formats that can be converted to/from you should take a look at the Pandoc documentation or the Pandoc help message `pandoc --help`.

If you need more control over how the conversion will be executed, use the `runWith` method. This method takes two arguments, content to convert and an array containing options. The options array can hold any of the pandoc command line options, see `pandoc --help`.

```
$pandoc = new Pandoc\Pandoc();
$options = array(
    "from"  => "markdown",
    "to"    => "html",
    "css"   => "/assets/css/documents.css"
);
$html = $pandoc->runWith("#Hello Pandoc", $options);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% 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 ~403 days

Total

3

Last Release

3335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/150f4881c4083f5dd9afd29fa7a7067a0b48bd026ebbd46a38935780497daf43?d=identicon)[gafhyb](/maintainers/gafhyb)

---

Top Contributors

[![gafhyb](https://avatars.githubusercontent.com/u/160254?v=4)](https://github.com/gafhyb "gafhyb (9 commits)")[![jeroenmoors](https://avatars.githubusercontent.com/u/1665245?v=4)](https://github.com/jeroenmoors "jeroenmoors (3 commits)")[![n1c01a5](https://avatars.githubusercontent.com/u/1773356?v=4)](https://github.com/n1c01a5 "n1c01a5 (2 commits)")[![animir](https://avatars.githubusercontent.com/u/4623196?v=4)](https://github.com/animir "animir (1 commits)")[![JorisM](https://avatars.githubusercontent.com/u/294174?v=4)](https://github.com/JorisM "JorisM (1 commits)")

### Embed Badge

![Health badge](/badges/gafhyb-pandoc-php/health.svg)

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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