[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overriding print.m pdf default terminal choices?
From: |
Ben Abbott |
Subject: |
Re: overriding print.m pdf default terminal choices? |
Date: |
Mon, 17 Aug 2009 12:50:29 -0400 |
On Monday, August 17, 2009, at 11:27AM, "Benjamin Lindner" <address@hidden>
wrote:
>Hello list,
>
>I wondered if it is possible to force print.m to use ghostscript for
>printing to pdf even if gnuplot provides a pdfcairo terminal?
>
>I ask because the last available gnuplot for win32 does not include the
>patch which fixes the spurious-pages-in-pdf-output bug.
>So a command as
> plot(0:0.1:10, sin(0:0.1:10), "@-"); print -dpdf test.pdf
>produces a three-page pdf.
>
>I don't know when there will be a new gnuplot release or snapshot
>release but the do not happen very frequently.
>
>So for the mingw32 binaries I'd like to have print.m to use ps->pdf via
>ghostscript for the moment.
>
>benjamin
I assume you are referring to Octave's latest sources, and that you are not
running gnuplot's development sources (meaning your version of gnuplot is
4.2.x, or earlier)?
If so then, what you're asking for should be the default. If it is not, then
the check for ghostscript may be failing.
Does the code below indicate you have ghostscript installed?
if (~isempty (getenv ("GSC")))
persistent ghostscript_binary = getenv ("GSC");
else
persistent ghostscript_binary = "gswin32c";
endif
[status, output] = system (sprintf ("if exist \"%s\" ( exit /B 1 ) else (
exit /B 0 )", ghostscript_binary));
have_ghostscript = (status == 0)
Ben
overriding print.m pdf default terminal choices?, Daniel J Sebald, 2009/08/27