Metadata-Version: 2.4
Name: imagetyler
Version: 0.1.0
Summary: Tile an image across a PDF page for print-ready output.
License: BSD 3-Clause License
        
        Copyright (c) 2026, Adityarup Laha
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice,
           this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer
Requires-Dist: reportlab
Requires-Dist: pillow
Dynamic: license-file

# ImageTyler

[![BSD-3-Clause](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)

ImageTyler tiles a source image across a PDF page for print-ready output. Entirely vibe-coded, but reviewed and tested by humans. It supports mixed-unit dimensions, padding, and cutting guides.

## Installation

Install as a standalone tool with `uv`:

```bash
uv tool install imagetyler
```

Add it as a dependency in your project:

```bash
uv add imagetyler
```

## CLI Usage

Basic usage:

```bash
imagetyler photo.jpg --size 35x45mm --paper A4
```

ImageTyler accepts mixed-unit dimensions and inherits missing units from either side of the `WxH` expression. These all work:

```bash
imagetyler photo.jpg --size 35x45mm --paper 210x297mm
imagetyler photo.jpg --size 35mmx45 --paper Letter
imagetyler photo.jpg --padding 2mm --landscape --border
```

Useful flags include `--padding` for spacing between tiles, `--landscape` for rotating the target page, and `--border` with `--border-width` for cutting guides.

Use `--list-units` to inspect supported measurement units and `--list-paper` to list recognized paper aliases.

## API Usage

```python
from pathlib import Path

from imagetyler import generate_tiled_pdf

output = generate_tiled_pdf(
    image_path=Path("photo.jpg"),
    output_pdf=Path("tiled_output.pdf"),
    paper="A4",
    image_size="35x45mm",
    padding="2mm",
)

print(output)
```

## License

ImageTyler is distributed under the BSD-3-Clause license.
