Skip to content

Feature: Configurable margin offsets for PDF rendering via config.ini #14

Description

@BrendM

Feature Request

Add configurable width and height margin offsets for PDF rendering via config.ini, allowing users to shift the card grid from its auto-centered position.

Required for Epson EcoTank ET-8550 printer compatibility.

Current behavior

In pdf_gen() (main.py:94), margins are auto-calculated to center the card grid on the page:

rx, ry = round((pw - (w * cols)) / 2), round((ph - (h * rows)) / 2)

There is no way for the user to adjust this — the grid is always perfectly centered.

Desired behavior

Add Margin.X and Margin.Y settings to config.ini (in points) that offset the card grid from its default centered position. Useful for:

  • Accommodating printer-specific feed offsets (e.g., Epson ET-8550)
  • Fine-tuning card placement for non-standard paper
  • Shifting the print area toward a specific edge (e.g., for binder or hole-punch clearance)

Suggested approach

  1. Add Margin.X and Margin.Y options to config.ini under [DEFAULT] (default to 0)
  2. Read them in pdf_gen() and apply to the existing rx/ry offsets
  3. No GUI changes needed — just config-driven

Affected files

  • main.pypdf_gen() function
  • config.ini — new margin defaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions