]> mj.ucw.cz Git - paperjam.git/blobdiff - pdf.cc
Cleaned up debugging messages
[paperjam.git] / pdf.cc
diff --git a/pdf.cc b/pdf.cc
index f262f5ba6952554dde4444fbd572aaab2d4c547f..d54506e6d669071b1771fcb1a45d96dda6d19afc 100644 (file)
--- a/pdf.cc
+++ b/pdf.cc
@@ -75,7 +75,7 @@ void in_page::render(out_context *out, pdf_matrix xform)
 
 void debug_pages(vector<page *> &pages)
 {
-  if (!debug_mode)
+  if (!debug_level)
     return;
 
   for (auto pg: pages)
@@ -111,6 +111,7 @@ vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages)
 
 void process(list<cmd *> &cmds)
 {
+  debug("### Reading input");
   in_pdf.processFile(in_name);
   in_pdf.pushInheritedAttributesToPage();
   out_pdf.emptyPDF();
@@ -127,8 +128,10 @@ void process(list<cmd *> &cmds)
   if (recalc_bbox)
     do_recalc_bbox(pages, in_name);
 
+  debug("### Running commands");
   pages = run_command_list(cmds, pages);
 
+  debug("### Writing output");
   for (auto pg: pages)
     {
       out_context out;
@@ -172,6 +175,7 @@ void process(list<cmd *> &cmds)
   // Write the output file
   QPDFWriter writer(out_pdf, out_name);
   writer.write();
+  debug("### Done");
 }
 
 /*** Re-calculation of bboxes ***/