Support A3 paper size.

This commit is contained in:
Akira TAGOH 2015-03-02 11:45:50 +09:00
parent 64c542c9d3
commit 90f158d50e
2 changed files with 48 additions and 2 deletions

40
paps-a3.patch Normal file
View File

@ -0,0 +1,40 @@
--- paps-0.6.8/src/paps.c.orig 2015-02-26 14:17:29.351338514 +0530
+++ paps-0.6.8/src/paps.c 2015-02-26 14:17:29.351338514 +0530
@@ -45,7 +45,8 @@
typedef enum {
PAPER_TYPE_A4 = 0,
PAPER_TYPE_US_LETTER = 1,
- PAPER_TYPE_US_LEGAL = 2
+ PAPER_TYPE_US_LEGAL = 2,
+ PAPER_TYPE_A3 = 3
} paper_type_t ;
typedef struct {
@@ -56,7 +57,8 @@
const paper_size_t paper_sizes[] = {
{ 595.28, 841.89}, /* A4 */
{ 612, 792}, /* US letter */
- { 612, 1008} /* US legal */
+ { 612, 1008}, /* US legal */
+ { 842, 1190} /* A3 */
};
typedef struct {
@@ -190,6 +192,8 @@
paper_type = PAPER_TYPE_US_LETTER;
else if (g_ascii_strcasecmp(value, "a4") == 0)
paper_type = PAPER_TYPE_A4;
+ else if (g_ascii_strcasecmp(value, "a3") == 0)
+ paper_type = PAPER_TYPE_A3;
else {
retval = FALSE;
fprintf(stderr, "Unknown page size name: %s.\n", value);
@@ -300,7 +304,7 @@
{"rtl", 0, 0, G_OPTION_ARG_NONE, &do_rtl, "Do rtl layout.", NULL},
{"paper", 0, 0, G_OPTION_ARG_CALLBACK, _paps_arg_paper_cb,
"Choose paper size. Known paper sizes are legal,\n"
- " letter, a4. (Default: a4)", "PAPER"},
+ " letter, a3, a4. (Default: a4)", "PAPER"},
{"bottom-margin", 0, 0, G_OPTION_ARG_INT, &bottom_margin, "Set bottom margin in postscript point units (1/72inch). (Default: 36)", "NUM"},
{"top-margin", 0, 0, G_OPTION_ARG_INT, &top_margin, "Set top margin. (Default: 36)", "NUM"},
{"right-margin", 0, 0, G_OPTION_ARG_INT, &right_margin, "Set right margin. (Default: 36)", "NUM"},

View File

@ -1,6 +1,6 @@
Name: paps
Version: 0.6.8
Release: 32%{?dist}
Release: 33%{?dist}
License: LGPLv2+
URL: http://paps.sourceforge.net/
@ -36,6 +36,8 @@ Patch57: paps-fix-non-weak-symbol.patch
Patch58: paps-correct-fsf-address.patch
## rhbz#1078519
Patch59: %{name}-ft-header.patch
## rhbz#1196997
Patch60: %{name}-a3.patch
Summary: Plain Text to PostScript converter
Group: Applications/Publishing
@ -80,6 +82,7 @@ applications using paps API.
%patch57 -p1 -b .weak-symbol
%patch58 -p1 -b .fsf
%patch59 -p1 -b .ft-header
%patch60 -p1 -b .a3
libtoolize -f -c
autoreconf -f -i
@ -127,6 +130,9 @@ install -p -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
%{_libdir}/libpaps.so
%changelog
* Mon Mar 2 2015 Akira TAGOH <tagoh@redhat.com> - 0.6.8-33
- Support A3 paper size.
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 0.6.8-32
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code