Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PDF terminal: how to get landscape orientation?

0 views
Skip to first unread message

Grant Edwards

unread,
Apr 24, 2007, 6:09:34 PM4/24/07
to
I'm trying to use the pdf terminal to generate plots I can give
to people to view/print. I've upgraded to 4.2 so that the pdf
terminal now has a size option so I can generate reasonably
sized plots (e.g 8x10in), but I can't get the oriented
correctly. They get clipped because the produced PDF file is
set to in portrait mode instead of landscape mode.

How do I get the pdf terminal to generate landscape output like
the postscript terminal does?

--
Grant Edwards grante Yow! I'm EMOTIONAL
at now because I have
visi.com MERCHANDISING CLOUT!!

Ethan Merritt

unread,
Apr 25, 2007, 12:26:04 AM4/25/07
to
In article <132t00u...@corp.supernews.com>,

Grant Edwards <gra...@visi.com> wrote:
>I'm trying to use the pdf terminal to generate plots I can give
>to people to view/print. I've upgraded to 4.2 so that the pdf
>terminal now has a size option so I can generate reasonably
>sized plots (e.g 8x10in), but I can't get the oriented
>correctly.

For me it 'just works'.

set term pdf size 10in,8in
set output 'plot.pdf'
plot ... whatever

Conceivably it may depend on what version of PDFlib you are using.
The current documentation for PDFlib claims that whenever
width > height, it will automatically generate landscape output.


--
Ethan A Merritt

Grant Edwards

unread,
Apr 25, 2007, 10:04:01 AM4/25/07
to
On 2007-04-25, Ethan Merritt <mer...@u.washington.edu> wrote:

>>I'm trying to use the pdf terminal to generate plots I can give
>>to people to view/print. I've upgraded to 4.2 so that the pdf
>>terminal now has a size option so I can generate reasonably
>>sized plots (e.g 8x10in), but I can't get the oriented
>>correctly.
>
> For me it 'just works'.
>
> set term pdf size 10in,8in
> set output 'plot.pdf'
> plot ... whatever
>
> Conceivably it may depend on what version of PDFlib you are
> using. The current documentation for PDFlib claims that
> whenever width > height, it will automatically generate
> landscape output.

That's probably it. I'm using Gentoo's "stable" version which
is 5.0.4, and I see the current version is 7.0.1. I'll try
upgrading pdflib to see if that helps.

--
Grant Edwards grante Yow! My mind is making
at ashtrays in Dayton ...
visi.com

Grant Edwards

unread,
Apr 25, 2007, 11:07:22 AM4/25/07
to
On 2007-04-25, Grant Edwards <gra...@visi.com> wrote:

>> set term pdf size 10in,8in
>> set output 'plot.pdf'
>> plot ... whatever
>>
>> Conceivably it may depend on what version of PDFlib you are
>> using. The current documentation for PDFlib claims that
>> whenever width > height, it will automatically generate
>> landscape output.
>
> That's probably it. I'm using Gentoo's "stable" version which
> is 5.0.4, and I see the current version is 7.0.1. I'll try
> upgrading pdflib to see if that helps.

Upgrading pdflib to 7.0.1 improved the situation, but it's
still generating a landscape file.

The plot now shows up correctly in xpdf (didn't used to).

However, it's still not recognized as landscape mode by any
apps. Doing an "lpr plot.pdf" still prints a clipped portrait
mode plot. Converting to postscript with "acroread
-toPostScript" also produces a clipped plot since acroread
still thinks it's a portrait-mode page. Acroread will
auto-rotate/scale the page for you you if you print from the
GUI, but it's definitely not a landscape mode plot (in which
case acroread wouldn't need to auto-scale/rotate the page to
get usable results).

By contrast if you generate a plot in landscape mode with the
postscript driver and then convert it to pdf with ps2pdf, it is
recognized as landscape by every app I've found (e.g. you can
print it with the command "lpr plot.pdf", acroread recognizes
it as landscape mode, etc.).

--
Grant Edwards grante Yow! I'm pretending that
at we're all watching PHIL
visi.com SILVERS instead of RICARDO
MONTALBAN!

Grant Edwards

unread,
Apr 25, 2007, 11:10:28 AM4/25/07
to
On 2007-04-25, Grant Edwards <gra...@visi.com> wrote:
> On 2007-04-25, Grant Edwards <gra...@visi.com> wrote:
>
>>> set term pdf size 10in,8in
>>> set output 'plot.pdf'
>>> plot ... whatever
>>>
>>> Conceivably it may depend on what version of PDFlib you are
>>> using. The current documentation for PDFlib claims that
>>> whenever width > height, it will automatically generate
>>> landscape output.
>>
>> That's probably it. I'm using Gentoo's "stable" version which
>> is 5.0.4, and I see the current version is 7.0.1. I'll try
>> upgrading pdflib to see if that helps.
>
> Upgrading pdflib to 7.0.1 improved the situation, but it's
> still generating a landscape file.
^
not

--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
visi.com

Ethan Merritt

unread,
Apr 25, 2007, 1:56:22 PM4/25/07
to
In article <132urr4...@corp.supernews.com>,

Grant Edwards <gra...@visi.com> wrote:
>On 2007-04-25, Grant Edwards <gra...@visi.com> wrote:
>> On 2007-04-25, Grant Edwards <gra...@visi.com> wrote:
>>
>>>> set term pdf size 10in,8in
>>>> set output 'plot.pdf'
>>>> plot ... whatever
>>>>
>>>> Conceivably it may depend on what version of PDFlib you are
>>>> using. The current documentation for PDFlib claims that
>>>> whenever width > height, it will automatically generate
>>>> landscape output.
>>>
>> Upgrading pdflib to 7.0.1 improved the situation, but it's
>> still not generating a landscape file.

You say it now looks OK in a pdf viewer.
I suspect the file is just fine, but your print system is not
handling it properly. Are you sure you don't have some
configuration option set that forces Portrait? For what it's worth,
my printer output is processed by cups, which has no trouble
with the gnuplot+pdf output.

--
Ethan A Merritt

Grant Edwards

unread,
Apr 25, 2007, 2:09:48 PM4/25/07
to
On 2007-04-25, Ethan Merritt <mer...@u.washington.edu> wrote:

>>>>> set term pdf size 10in,8in
>>>>> set output 'plot.pdf'
>>>>> plot ... whatever
>>>>>
>>>>> Conceivably it may depend on what version of PDFlib you are
>>>>> using. The current documentation for PDFlib claims that
>>>>> whenever width > height, it will automatically generate
>>>>> landscape output.
>>>>
>>> Upgrading pdflib to 7.0.1 improved the situation, but it's
>>> still not generating a landscape file.
>
> You say it now looks OK in a pdf viewer.

Correct.

> I suspect the file is just fine, but your print system is not
> handling it properly.

Using the postscript driver with the "landscape" option works
fine -- either with or without conversion to pdf using ps2pdf.

> Are you sure you don't have some
> configuration option set that forces Portrait?

One would presume that would affect pdf files produced by
ps2pdf as well.

> For what it's worth, my printer output is processed by cups,
> which has no trouble with the gnuplot+pdf output.

I'm also using CUPS, and printing gnuplot+pdf doesn't work for
me, but gnuplot+ps does.

--
Grant Edwards grante Yow! Vote for ME -- I'm
at well-tapered, half-cocked,
visi.com ill-conceived and
TAX-DEFERRED!

0 new messages