From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Agenda printing: org-agenda-write doesn't use ps-paper-type
Date: Thu, 13 Jun 2013 17:59:00 -0400 [thread overview]
Message-ID: <87zjuty8nv.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: 87vc5hd9uc.fsf@gmail.com
Myles English <mylesenglish@gmail.com> writes:
> Eric,
>
> Eric S Fraga writes:
>
>> Myles English <mylesenglish@gmail.com> writes:
>>
>>> Thanks for checking it. Yes, I had to change this line in
>>> org-agenda.el:
>>>
>>> - (call-process "ps2pdf" nil nil nil
>>> + (call-process "ps2pdf" nil nil nil "-sPAPERSIZE=a4"
>>
>> If you use a4 sized paper all (or most of) the time, you can set this in
>> /etc/papersize on Linux. I think this is what ps2pdf looks at by
>> default.
>>
>> I think paperconfig (8) is used to set this property properly.
>
> Thanks for the suggestions. I looked into this for my Arch Linux but it
> had no effect on ps2pdf. Making the /etc/papersize file and then
> setting PAPERSIZE=a4 or PAPERCONF=/etc/papersize did not produce an A4
> pdf document (even after installing libpaper).
>
> Setting GS_OPTIONS="-sPAPERSIZE=a4" worked.
>
> What also worked was manually adding this to the .ps file:
>
> %%BeginPaperSize: a4
> %%EndPaperSize
>
> I am wondering if ps-print should have known to add this because
> ps-paper-type is set to a4?
>
> Thanks,
> Myles
>
>
Just as another possibility: if there is no cleaner way, one
quick-and-dirty workaround for such problems (this one, the latex
preview/mint-requires-shell-escape one, etc.) is to have little personal
wrapper scripts that call the "real" program and pass the appropriate
args. E.g. create ~/bin/ps2pdf containing
--8<---------------cut here---------------start------------->8---
#! /bin/bash
/usr/bin/ps2pdf -sPAPERSIZE=a4 $*
--8<---------------cut here---------------end--------------->8---
make it executable and make sure that ~/bin is before /usr/bin in your
PATH. call-process calls ps2pfs which resolves to ~/bin/ps2pdf and that
one calls /usr/bin/ps2pdf - be sure to use the full pathname here or all
hell will break loose.
This has the potential of creating a lot of confusion, so I wouldn't do
it if there is another way (as there is in this case), but if one is
getting desperate...
--
Nick
next prev parent reply other threads:[~2013-06-13 21:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 1:04 Agenda printing: org-agenda-write doesn't use ps-paper-type Myles English
2013-06-12 7:31 ` Christian Egli
2013-06-12 10:06 ` Myles English
2013-06-12 16:01 ` Eric S Fraga
2013-06-12 21:57 ` Myles English
2013-06-13 7:50 ` Eric S Fraga
2013-06-13 20:39 ` Myles English
2013-06-13 21:59 ` Nick Dokos [this message]
2013-06-14 9:03 ` Eric S Fraga
2013-06-13 8:11 ` Christian Egli
2013-06-13 13:32 ` Rainer Stengele
2013-06-13 20:30 ` Myles English
2013-06-14 7:57 ` Sebastien Vauban
2013-06-14 11:41 ` Myles English
2013-06-14 11:51 ` Sebastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjuty8nv.fsf@pierrot.dokosmarshall.org \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).