9. Multiple input file concatenation #11

Closed
opened 2026-05-20 15:31:25 -06:00 by ppreeper · 0 comments
Owner

Description

Handle multiple input HTML files by concatenating them before passing to Chrome.

Tasks

  • Accept multiple INPUT positional arguments
  • Read each HTML file in order
  • Concatenate into a single temp HTML file
  • Pass temp file to Chrome as input
  • Clean up temp file after Chrome exits
  • Handle missing input files with exit code 4

Acceptance Criteria

  • wkhtmltopdf a.html b.html c.html out.pdf produces merged PDF
  • Files concatenated in order: a, then b, then c
  • Temp file cleaned up after execution
  • Missing input file exits with code 4
  • Single input file works without temp file creation

Notes

  • Use tempfile module for temp file
  • Simple concatenation (wrap each in <div> to avoid CSS conflicts)
  • Relates to PRD #2
## Description Handle multiple input HTML files by concatenating them before passing to Chrome. ## Tasks - [ ] Accept multiple INPUT positional arguments - [ ] Read each HTML file in order - [ ] Concatenate into a single temp HTML file - [ ] Pass temp file to Chrome as input - [ ] Clean up temp file after Chrome exits - [ ] Handle missing input files with exit code 4 ## Acceptance Criteria - `wkhtmltopdf a.html b.html c.html out.pdf` produces merged PDF - Files concatenated in order: a, then b, then c - Temp file cleaned up after execution - Missing input file exits with code 4 - Single input file works without temp file creation ## Notes - Use `tempfile` module for temp file - Simple concatenation (wrap each in `<div>` to avoid CSS conflicts) - Relates to PRD #2
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ppreeper/wkhtmltopdf#11
No description provided.