PDF Generation

PDF generation module for Simulchip proxy cards.

This module provides functionality to generate print-ready PDF files containing proxy cards for Netrunner. Cards are laid out in a 3x3 grid optimized for standard card sleeves.

Classes:

ProxyPDFGenerator: Main class for generating proxy PDFs.

class simulchip.pdf.generator.ProxyPDFGenerator[source]

Bases: object

Generate PDF files with proxy cards.

This class creates print-ready PDFs with Netrunner cards laid out in a 3x3 grid. Cards are sized to match standard Netrunner dimensions (63mm x 88mm) and are optimized for printing and sleeving.

CARD_WIDTH

Standard Netrunner card width (63mm).

CARD_HEIGHT

Standard Netrunner card height (88mm).

PAGE_MARGIN

Margin around the page edges.

CARD_SPACING

Space between cards.

Examples

Generate a PDF with proxy cards:

generator = ProxyPDFGenerator(api_client)
missing_cards = [CardInfo(...)]
generator.generate_pdf(missing_cards, "proxies.pdf")
CARD_WIDTH = 178.58267716535434
CARD_HEIGHT = 249.4488188976378
PAGE_MARGIN = 18.0
CARD_SPACING = 9.0
__init__(api_client, page_size='letter')[source]

Initialize PDF generator.

Parameters:
  • api_client (NetrunnerDBAPI) – NetrunnerDB API client instance for fetching card images.

  • page_size (str) – Page size for the PDF. Supported values are “letter” (8.5x11 inches) or “a4”. Defaults to “letter”.

Note

The generator always uses a 3x3 grid layout regardless of page size to ensure consistent card sizing and optimal printing.

generate_proxy_pdf(cards, output_path, download_images=True, group_by_pack=False, interactive_printing_selection=False)[source]

Generate PDF with proxy cards.

Parameters:
  • cards (List[CardInfo]) – List of cards to generate proxies for

  • output_path (Path) – Output PDF file path

  • download_images (bool) – Whether to download card images

  • group_by_pack (bool) – Whether to group cards by pack

  • interactive_printing_selection (bool) – Whether to prompt for alternate printings

Return type:

None

generate_pack_pdf(pack_code, output_path, collection_manager, download_images=True)[source]

Generate PDF for all missing cards from a specific pack.

Parameters:
  • pack_code (str) – Pack code

  • output_path (Path) – Output PDF file path

  • collection_manager (CollectionManager) – Collection manager to check owned cards

  • download_images (bool) – Whether to download card images

Return type:

None