scholium.slide_processor.SlideProcessor#

class SlideProcessor(pandoc_template='beamer', resolution=(1920, 1080))[source]#

Bases: PandocBackend

Pandoc/Beamer slide processor.

Preserved as a thin subclass of PandocBackend so the original constructor signature SlideProcessor(pandoc_template=..., resolution=...) continues to work. New code should use the backend registry instead:

from scholium.slides import get_backend
backend = get_backend("pandoc", resolution=(1920, 1080))

Initialise the backend.

Parameters:
  • resolution (Tuple[int, int]) – Target image resolution as (width, height).

  • backend_config – Backend-specific options from config.yaml.

Methods

markdown_to_pdf

Convert markdown to PDF using pandoc.

pdf_to_images

Rasterise a PDF into PNG slides at the configured resolution.

probe_dependencies

Check pandoc + a LaTeX engine on PATH.

process

Run the markdown → PDF → PNG pipeline.

Attributes

name

Short identifier used in config (slide_backend: ...).

markdown_to_pdf(markdown_path, output_path)#

Convert markdown to PDF using pandoc.

Raises:
Return type:

str

name: str = 'pandoc'#

Short identifier used in config (slide_backend: ...).

pdf_to_images(pdf_path, output_dir, dpi=300)#

Rasterise a PDF into PNG slides at the configured resolution.

Raises:
Return type:

List[str]

probe_dependencies()#

Check pandoc + a LaTeX engine on PATH.

Return type:

List[Probe]

process(markdown_path, output_dir)#

Run the markdown → PDF → PNG pipeline.

Parameters:
  • markdown_path (str) – Path to markdown file.

  • output_dir (str) – Directory for intermediate PDF and PNG files.

Return type:

List[str]

Returns:

List of paths to generated slide images.