Push Bot commited on
Commit
e35a17a
·
1 Parent(s): 5bf534e

Debug: add image preview (first page) with PyMuPDF/pdfium; return PDF path from debug flows; chain .then to render image

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1512,11 +1512,11 @@ def debug_compile_uploaded_zip(zip_file):
1512
  + _pdf_to_iframe_html(pdf_path, height="700px")
1513
  )
1514
  _write_logs(LOG_PATH, logs)
1515
- return html
1516
  except Exception as e:
1517
  logs.append(f"⚠️ preview failed: {e}")
1518
  _write_logs(LOG_PATH, logs)
1519
- return f"<div>Compiled but preview failed: {e}</div>"
1520
 
1521
  def debug_compile_output_zip():
1522
  """Compile the repo-root output.zip (a real LaTeX project) and preview the resulting PDF."""
 
1512
  + _pdf_to_iframe_html(pdf_path, height="700px")
1513
  )
1514
  _write_logs(LOG_PATH, logs)
1515
+ return html, str(pdf_path)
1516
  except Exception as e:
1517
  logs.append(f"⚠️ preview failed: {e}")
1518
  _write_logs(LOG_PATH, logs)
1519
+ return f"<div>Compiled but preview failed: {e}</div>", None
1520
 
1521
  def debug_compile_output_zip():
1522
  """Compile the repo-root output.zip (a real LaTeX project) and preview the resulting PDF."""