From bd1389b30f2a5addf0570c5f3358567df8134fc6 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 2 Apr 2018 14:13:24 +0200 Subject: [PATCH] TODO --- TODO | 26 ++++++++++++++++++++++++++ pdf.cc | 1 + 2 files changed, 27 insertions(+) diff --git a/TODO b/TODO index fea7831..c49fba3 100644 --- a/TODO +++ b/TODO @@ -2,3 +2,29 @@ - What if an input page specifies /Rotate? - Better error messages from instantiation - page->index: use or remove +- rename page->bbox to page->image_box? + +# Position bbox on a new paper +paper("a4") +paper(w=210mm,h=297mm,pos=(t|b|c)(l|r|c)) + +# Scale paper to a new size +scaleto("a4") +scaleto(w=210mm,h=297mm,pos=tl) + +# Fit image to a paper +# If paper is given: scale image +# If no paper is given: adjust paper to image + margins +fit("a4") +fit(w=, h=) +margin= hmargin= vmargin= +lmargin= rmargin= tmargin= bmargin= +pos= + +# Adjust paper size +expand(10mm) +expand(h=10mm, v=20mm) +expand(l=10mm, r=10mm, t=10mm, b=10mm) + +# Adjust image size (in terms of margins around) +margins ... params like expand diff --git a/pdf.cc b/pdf.cc index daf68c2..e40e3f1 100644 --- a/pdf.cc +++ b/pdf.cc @@ -221,6 +221,7 @@ vector gs_bboxes(const char *in) static void do_recalc_bbox(vector &pages, const char *in_name) { + debug("Calling Ghostscript to re-calculate bounding boxes"); vector bboxes = gs_bboxes(in_name); if (pages.size() != bboxes.size()) die("Ghostscript failed to produce the right number of bboxes"); -- 2.39.2