From ebbe5776c80b21f8b51e8338acf046904642a696 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Thu, 31 Jul 2025 15:56:24 -0500 Subject: [PATCH 1/3] Increase size limit --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 6ef1d68..0ddcea9 100644 --- a/app/main.py +++ b/app/main.py @@ -15,7 +15,7 @@ SUBPROCESS_TIMEOUT = 60 # seconds MAX_QUEUE_WAIT_TIME = 30 # max time to wait in queue before bailing, prevents case where queue gets so long that no requests finish before browser timeout -MAX_INPUT_SIZE = 5000000 # bytes +MAX_INPUT_SIZE = 10000000 # bytes MAX_CONCURRENT_PANDOC_RUNS = 2 MD_FILE_NAME = "input.md" OUTPUT_FILE_NAME_BASE = "output" @@ -196,4 +196,4 @@ async def health_check(): if all([not task.done() for task in tasks]): return Response(status_code=200, content="All tasks are currently running") else: - return Response(status_code=503, content="Some tasks are no longer active") \ No newline at end of file + return Response(status_code=503, content="Some tasks are no longer active") From 6f26eb83e2d3f8350224c257c331662a4c93ede1 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Thu, 31 Jul 2025 16:01:46 -0500 Subject: [PATCH 2/3] feat: update pdf error message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 0ddcea9..814b8db 100644 --- a/app/main.py +++ b/app/main.py @@ -86,7 +86,7 @@ async def convert(self): if proc.returncode != 0: if self.doc_type == "pdf": - raise HTTPException(status_code=500, detail="Error generating a PDF, consider generating a .docx file instead since the .pdf generation process can have errors with certain image types or certain fonts.

" + raise HTTPException(status_code=500, detail="Error generating PDF file. Image links are know to cause errors when generating .pdf documents. Replace image links with images inserted as files. If errors persist, consider exporting as a .docx file instead.

" + "Pandoc process error: " + stderr.decode()) else: raise HTTPException(status_code=500, detail=stderr.decode()) From 9fd86a110697559bb51ccc0407fbbe663fd0b329 Mon Sep 17 00:00:00 2001 From: Michael Greminger Date: Thu, 31 Jul 2025 16:03:56 -0500 Subject: [PATCH 3/3] fix: fix typo in error message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 814b8db..f3932e7 100644 --- a/app/main.py +++ b/app/main.py @@ -86,7 +86,7 @@ async def convert(self): if proc.returncode != 0: if self.doc_type == "pdf": - raise HTTPException(status_code=500, detail="Error generating PDF file. Image links are know to cause errors when generating .pdf documents. Replace image links with images inserted as files. If errors persist, consider exporting as a .docx file instead.

" + raise HTTPException(status_code=500, detail="Error generating PDF file. Image links are known to cause errors when generating .pdf documents. Replace image links with images inserted as files. If errors persist, consider exporting as a .docx file instead.

" + "Pandoc process error: " + stderr.decode()) else: raise HTTPException(status_code=500, detail=stderr.decode())