PHPackages                             asifm42/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. asifm42/pandoc-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

asifm42/pandoc-php
==================

PHP pandoc

012PHP

Since Mar 18Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#pandoc-php)

[![Build Status](https://camo.githubusercontent.com/5f69af3b0c7184c3c592741e91854a3864fb88eab25acddfc3240bed4477836d/68747470733a2f2f7472617669732d63692e6f72672f6f6e6472732f70616e646f632d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ondrs/pandoc-php)

Pandoc PHP is a native 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": {
        "asifm42/pandoc-php": "dev-master"
    }
}
```

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

```
$pandoc = new Pandoc('/path/to/temp/dir');
$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('/path/to/temp/dir');
$options = array(
    "from"  => "markdown",
    "to"    => "html",
    "css"   => "/assets/css/documents.css"
);
$html = $pandoc->runWith("#Hello Pandoc", $options);
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/19e94f33fff5211ffb821fc69c4a727f7a996ff5fd7048886ed2c834b98d68ea?d=identicon)[asifm42](/maintainers/asifm42)

---

Top Contributors

[![ondrs](https://avatars.githubusercontent.com/u/828362?v=4)](https://github.com/ondrs "ondrs (19 commits)")[![jeroenmoors](https://avatars.githubusercontent.com/u/1665245?v=4)](https://github.com/jeroenmoors "jeroenmoors (3 commits)")[![asifm42](https://avatars.githubusercontent.com/u/750384?v=4)](https://github.com/asifm42 "asifm42 (2 commits)")[![n1c01a5](https://avatars.githubusercontent.com/u/1773356?v=4)](https://github.com/n1c01a5 "n1c01a5 (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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