PHPackages                             kazyumaru/papersize - 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. kazyumaru/papersize

ActiveLibrary

kazyumaru/papersize
===================

Calculate size of paper used in Japan.

v1.0.1(4y ago)024MITPHP

Since Dec 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kazyumaru/papersize)[ Packagist](https://packagist.org/packages/kazyumaru/papersize)[ RSS](/packages/kazyumaru-papersize/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Kazyumaru\\Papersize
====================

[](#kazyumarupapersize)

主な用紙のサイズを出力するPHPスクリプトです。 日本で使用されている用紙をだいたいカバーしました。 This PHP script returns the size of major paper scheet.

Requirement
===========

[](#requirement)

PHP &gt;= 7.2 確認できた環境が上記ですが、特に複雑な処理は行なっていないので composerを使用しない手動での導入であればPHP5.6などでも動作すると 思われます。

usage
=====

[](#usage)

composerでインストールする場合は composer require kazyumaru/papersize

使いたいファイルの冒頭でincludeします。 include('papersize.php'); composerの場合は require('vendor/autoload.php'); です。

用紙サイズのクラスは下記のように使います。 $papersize = new Kazyumaru\\Papersize;

用紙サイズなどを下記のように設定します。 $paperinfo = $papersize-&gt;set((string)$size,(string)$orientation,(string)$unit);

$size 用紙サイズです。 A10〜A0、B10〜B0、ISOB5、Letter、Legal、Tabroid、名刺が呼び出せます。 用紙の指定は名刺がbcardです。 A4やISOB5は、a4やisob5でも呼び出せます。 日本国内で通常使用しているB5はB5,b5,JISB5,jisb5のいずれでも呼び出せます。 LetterやLegalなどは、LETTERでもlegalでも呼び出せます。

$orientation 紙の向きです。 省略可です。省略時はp（縦に長いportrate）です。 縦に長いとき Pまたはp 横に長いとき Lまたはl

$unit 単位です。 省略可です。省略時はmm（ミリメートル）です。

次の単位に変換できます。 inch,pt,q,cm ただし、全てmmからの計算のため、若干の誤差のある値であることをご承知おきください。

返り値を格納する$paperinfo はObjectです。

横幅 (float/int)$paperinfo-&gt;width

縦幅 (float/int)$paperinfo-&gt;height

用紙サイズ (string)$paperinfo-&gt;size

単位 (string)$paperinfo-&gt;unit

向き (string)$paperinfo-&gt;orientation

note
====

[](#note)

I don't test environments under Windows. Windows上のApacheでは確認していませんが、動くと思います。

Author
======

[](#author)

りこ（Kazyumaru） Twitter @developer\_riko

License
=======

[](#license)

kazyumaru\\PaperSize is under \[MIT licence\] ()

Thank you.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1598d ago

### Community

Maintainers

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

---

Top Contributors

[![kazyumaru](https://avatars.githubusercontent.com/u/36285580?v=4)](https://github.com/kazyumaru "kazyumaru (25 commits)")

### Embed Badge

![Health badge](/badges/kazyumaru-papersize/health.svg)

```
[![Health](https://phpackages.com/badges/kazyumaru-papersize/health.svg)](https://phpackages.com/packages/kazyumaru-papersize)
```

PHPackages © 2026

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