PHPackages                             jormin/md-convert - 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. jormin/md-convert

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

jormin/md-convert
=================

Markdown 转 Html 或 PDF

v1.0.0(7y ago)0145MITCSSPHP ^5.6 || ^7.0

Since Sep 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jormin/md-convert)[ Packagist](https://packagist.org/packages/jormin/md-convert)[ Docs](https://github.com/jormin/md-convert)[ RSS](/packages/jormin-md-convert/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Markdown 转 Html 或 PDF

安装
--

[](#安装)

```
$ composer require jormin/md-convert -vvv
```

通用响应
----

[](#通用响应)

参数类型是否必须描述successbool是false：操作失败 true:操作成功messagestring是结果说明dataarray否返回数据使用
--

[](#使用)

### 生成转换对象

[](#生成转换对象)

```
$mdConvert = \Jormin\MDConvert\MDConvert::load();
```

### 转换Html

[](#转换html)

> 转换结果为 zip 压缩包，包含 `html` 文件和 `css` 文件

```
/**
 * 转换Html
 *
 * @param string $mdFile Markdown源文件绝对路径，需要可读
 * @param string $savePath 转换后文件存储目录，需要可读可写，为空默认使用源文件目录
 * @param array $saveName 转换后文件名称，为空默认使用源文件名称
 * @return array
 */
$mdConvert->toHtml($mdFile, [$savePath=null, $saveName=null]);
```

### 转换PDF

[](#转换pdf)

```
/**
 * 转换PDF
 *
 * @param string $mdFile Markdown源文件绝对路径，需要可读
 * @param string $savePath 转换后文件存储目录，需要可读可写，为空默认使用源文件目录
 * @param array $saveName 转换后文件名称，为空默认使用源文件名称
 * @return array
 */
$mdConvert->toPDF($mdFile, [$savePath=null, $saveName=null]);
```

参考扩展
----

[](#参考扩展)

1. [erusev/parsedown](https://github.com/erusev/parsedown)
2. [mpdf/mpdf](https://github.com/mpdf/mpdf)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2855d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5519318?v=4)[Jormin](/maintainers/jormin)[@jormin](https://github.com/jormin)

---

Top Contributors

[![jormin](https://avatars.githubusercontent.com/u/5519318?v=4)](https://github.com/jormin "jormin (7 commits)")

---

Tags

pdfhtmlmarkdownJormin

### Embed Badge

![Health badge](/badges/jormin-md-convert/health.svg)

```
[![Health](https://phpackages.com/badges/jormin-md-convert/health.svg)](https://phpackages.com/packages/jormin-md-convert)
```

###  Alternatives

[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3845.9M26](/packages/gotenberg-gotenberg-php)[spipu/html2pdf

Html2Pdf is a HTML to PDF converter written in PHP - It uses TCPDF - OFFICIAL PACKAGE

1.8k10.9M47](/packages/spipu-html2pdf)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[kartik-v/yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.

1605.6M86](/packages/kartik-v-yii2-mpdf)[kartik-v/yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)

1613.2M36](/packages/kartik-v-yii2-export)[themsaid/ibis

Markdown to PDF book builder

2.0k2.0k](/packages/themsaid-ibis)

PHPackages © 2026

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