summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordov-g <dov-g>2006-03-28 08:24:46 +0000
committerdov-g <dov-g>2006-03-28 08:24:46 +0000
commit17f19a8b5909812c2028e5dbc968fa069f59ad3a (patch)
tree02ad8f845633e02437c2aa8d0b76d5eb43903363
parent1f6f93026483184fa03a03b3c79c13a00f1ee216 (diff)
downloadpaps-17f19a8b5909812c2028e5dbc968fa069f59ad3a.zip
paps-17f19a8b5909812c2028e5dbc968fa069f59ad3a.tar.gz
paps-17f19a8b5909812c2028e5dbc968fa069f59ad3a.tar.xz
* src/paps.c: Applied tagoh's patch for setting the page size
in PostScript. * src/paps.c: Fixed linebreaks in --help printout.
-rw-r--r--ChangeLog9
-rw-r--r--configure.in2
-rw-r--r--src/paps.c19
3 files changed, 22 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c1f5d0..92a8061 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
+2006-03-28 Dov Grobgeld <dov.grobgeld@gmail.com>
+
+ * src/paps.c: Applied tagoh's patch for setting the page size
+ in PostScript.
+
+ * src/paps.c: Fixed linebreaks in --help printout.
+
2005-12-22 Dov Grobgeld <dov.grobgeld@gmail.com>
+ * Released new bugfix version 0.6.3
+
* src/libpaps.c: Fixed overflow of static hash character size.
2005-12-20 Dov Grobgeld <dov.grobgeld@gmail.com>
diff --git a/configure.in b/configure.in
index a5a1db3..9439559 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
AC_INIT(configure.in)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(paps, 0.6.2)
+AM_INIT_AUTOMAKE(paps, 0.6.4)
AC_LANG_C
AC_PROG_CC
diff --git a/src/paps.c b/src/paps.c
index 6291c82..3e86fa8 100644
--- a/src/paps.c
+++ b/src/paps.c
@@ -200,12 +200,12 @@ int main(int argc, char *argv[])
" --font_scale fs Font scaling. Default is 12.\n"
" --family f Pango ft2 font family. Default is sans.\n"
" --rtl Do rtl layout.\n"
- " --paper ps Choose paper size. Known paper sizes are legal, letter, a4.\n"
- " Default is A4.\n"
- " --bottom-margin bm Set bottom margin. Default is 36."
- " --top-margin tm Set top margin. Default is 36."
- " --left-margin lm Set left margin. Default is 36."
- " --right-margin rm Set right margin. Default is 36."
+ " --paper ps Choose paper size. Known paper sizes are legal, letter,\n"
+ " A4. Default is A4.\n"
+ " --bottom-margin bm Set bottom margin. Default is 36.\n"
+ " --top-margin tm Set top margin. Default is 36.\n"
+ " --left-margin lm Set left margin. Default is 36.\n"
+ " --right-margin rm Set right margin. Default is 36.\n"
);
@@ -225,6 +225,7 @@ int main(int argc, char *argv[])
CASE("legal") { paper_type=PAPER_TYPE_US_LEGAL; break; }
CASE("letter") { paper_type=PAPER_TYPE_US_LETTER; break; }
CASE("a4") { paper_type=PAPER_TYPE_A4; break; }
+ CASE("A4") { paper_type=PAPER_TYPE_A4; break; }
fprintf(stderr, "Unknown page size %s!\n", S_);
exit(1);
@@ -556,8 +557,9 @@ void print_postscript_header(FILE *OUT,
fprintf(OUT,
"%%!PS-Adobe-3.0\n"
"%%%%Title: %s\n"
- "%%%%Creator: paps version 0.1 by Dov Grobgeld\n"
+ "%%%%Creator: paps version 0.6.3 by Dov Grobgeld\n"
"%%%%Pages: (atend)\n"
+ "%%%%BoundingBox: 0 0 %d %d\n"
"%%%%BeginProlog\n"
"%%%%Orientation: %s\n"
"/papsdict 1 dict def\n"
@@ -605,6 +607,8 @@ void print_postscript_header(FILE *OUT,
" 0 pageheight neg translate\n"
"} def\n",
title,
+ page_layout->page_width,
+ page_layout->page_height,
orientation_names[orientation]
);
@@ -612,6 +616,7 @@ void print_postscript_header(FILE *OUT,
"%% User settings\n"
"/pagewidth %d def\n"
"/pageheight %d def\n"
+ "pagewidth pageheight setpagesize\n"
"/column_width %d def\n"
"/bodyheight %d def\n"