]> mj.ucw.cz Git - paperjam.git/commitdiff
TODO
authorMartin Mares <mj@ucw.cz>
Mon, 2 Apr 2018 12:13:24 +0000 (14:13 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 2 Apr 2018 12:13:24 +0000 (14:13 +0200)
TODO
pdf.cc

diff --git a/TODO b/TODO
index fea7831fd2c34412c7dfcff7aae70da220466e97..c49fba3655b76be57d082896ae5402b30c18aa0c 100644 (file)
--- 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 daf68c254bb30ecb8883d5943d43c0b624673a6e..e40e3f1c2e388356bf1d64372e33f6a2ca2085e7 100644 (file)
--- a/pdf.cc
+++ b/pdf.cc
@@ -221,6 +221,7 @@ vector<BBox> gs_bboxes(const char *in)
 
 static void do_recalc_bbox(vector<page *> &pages, const char *in_name)
 {
+  debug("Calling Ghostscript to re-calculate bounding boxes");
   vector<BBox> bboxes = gs_bboxes(in_name);
   if (pages.size() != bboxes.size())
     die("Ghostscript failed to produce the right number of bboxes");