Metadata-Version: 2.4
Name: pdf-imposer
Version: 1.0.0
Summary: A Python-based GUI tool for 2-up Cut & Stack PDF imposition
Author: Sh1ragami
License: MIT
Project-URL: Homepage, https://github.com/Sh1ragami/pdf-imposer
Project-URL: Issues, https://github.com/Sh1ragami/pdf-imposer/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: X11 Applications :: GTK
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Printing
Classifier: Topic :: Multimedia :: Graphics :: Viewers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: pymupdf>=1.18.0
Requires-Dist: Pillow>=8.0.0
Dynamic: license-file

<div align="center">
  <img width="400" alt="pdf-imposer-logo" src="https://github.com/user-attachments/assets/51bbec3c-9576-4a09-8afd-fa8e7514dd94" />
</div>

<div align="center">
  
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)

  2-up Cut & Stack用PDF面付けGUIツール
</div>

---

<img width="1406" height="832" alt="pdf-imposer-screen1" src="https://github.com/user-attachments/assets/b50818f2-9cb4-45f9-a7c6-24ec9f3dfcf4" />

## 2-up Cut & Stack とは

印刷した用紙の束を中央で2つに裁断し、一方の束をもう一方の束の上に重ねるだけで、ページ順が正しく揃う面付け方式です。
A4横向きの用紙にA5サイズを2ページ分印刷し、半分にカットしてA5サイズの冊子を作成するのに適しています。

---

## 主な機能

| 機能 | 説明 |
| :--- | :--- |
| 自動面付け | ページ数を4の倍数に自動調整（必要に応じて白紙を挿入）し、Cut & Stack用に再配置します。 |
| レイアウトプレビュー | A4用紙の表面・裏面の印刷レイアウト、余白、とじ代を視覚的に確認できます。 |
| 完成プレビュー | 製本後の見開き状態（A5本）をページ順にシミュレーション確認できます。 |
| ページ管理 | プレビューを確認しながら、任意の場所への白紙挿入や、不要ページの削除が行えます。 |
| 余白設定 | 基本余白ととじ代（ミリ単位）、および綴じ方向（左綴じ/右綴じ）を調整できます。 |
| 直接印刷・出力 | 面付け済みPDFのエクスポート、およびシステムプリンターへの直接印刷（Linux環境）に対応しています。 |

---

## インストール

### リポジトリから直接インストールする
```bash
pip install git+https://github.com/Sh1ragami/pdf-imposer.git
```

### ローカルから開発モードでインストールする
```bash
git clone https://github.com/Sh1ragami/pdf-imposer.git
cd pdf-imposer
pip install -e .
```

---

## 使い方

### コマンドラインから起動する
インストール後、以下のコマンドで起動します。
```bash
pdf-imposer
```

### ソースコードから直接実行する
```bash
pip install -r requirements.txt
PYTHONPATH=src python3 -m pdf_imposer.app
```

---

## 必要動作環境

- OS: Linux, macOS, Windows (Tkinterが動作する環境)
- Python: 3.8以上
- 主要ライブラリ: PyMuPDF, Pillow, tkinter (標準ライブラリ)

---

## ライセンス

[MIT License](LICENCE)
