port print-web-form app to nested flask structure

Replace stub print/ app with full PDF web print service from
~/print-web-form. Adapt UPLOAD_FOLDER to use Path(__file__).parent,
add pypdf dependency, port all tests (10 passing), remove unused static/.
This commit is contained in:
Connor Rhodes 2026-04-23 20:07:07 -05:00
parent af5d3f148d
commit b0c19d5642
9 changed files with 340 additions and 0 deletions

View file

@ -0,0 +1,13 @@
from app import get_pdf_page_count
def test_page_count_valid_pdf(sample_pdf_path):
assert get_pdf_page_count(sample_pdf_path) == 3
def test_page_count_corrupt_file(corrupt_file_path):
assert get_pdf_page_count(corrupt_file_path) is None
def test_page_count_nonexistent_file():
assert get_pdf_page_count("/nonexistent/file.pdf") is None