Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
PDFs, paper orientation, version differences

Subject: PDFs, paper orientation, version differences

From: Misha Koshelev

Date: 11 Aug, 2009 16:53:05

Message: 1 of 5

Dear All:

I have a very strange problem. Printing PDFs, same exact code, using R2008a I get a landscape PDF output in landscape orientation:
http://people.hnl.bcm.edu/misha/tmp/R2008a.pdf

Using R14SP3 I get it "landscape" but in a portrait PDF:
http://people.hnl.bcm.edu/misha/tmp/R14SP3.pdf

Here is the relevant code:
>> fig = figure('visible', 'off');
>> plot([1 2]);
>> orient landscape;
>> print(fig, '-painters', '-dpdf', 'R14SP3.pdf');

In EPSC the problem goes away, but I need PDFs for pdflatex
(I know I can convert, but the epstopdf utility does not exist on one of the computers and I can't install).

Thank you
Misha

Subject: PDFs, paper orientation, version differences

From: Rune Allnor

Date: 11 Aug, 2009 17:37:49

Message: 2 of 5

On 11 Aug, 18:53, "Misha Koshelev" <mk144...@bcm.edu> wrote:
> Dear All:
>
> I have a very strange problem. Printing PDFs, same exact code, using R2008a I get a landscape PDF output in landscape orientation:http://people.hnl.bcm.edu/misha/tmp/R2008a.pdf
>
> Using R14SP3 I get it "landscape" but in a portrait PDF:http://people.hnl.bcm.edu/misha/tmp/R14SP3.pdf

...and the problem is...?

You don't want to use full-size landscape pagesizes for
figures to be included in LaTeX documents. Instead,
manipulate the PAPERSIZE and PAPERPOSITION properties
to match the figure sizes you want.

Rune

Subject: PDFs, paper orientation, version differences

From: Misha Koshelev

Date: 11 Aug, 2009 18:39:19

Message: 3 of 5

Rune Allnor <allnor@tele.ntnu.no> wrote in message <a02b2546-8696-4010-8529-0bd7f2b232ed@b14g2000yqd.googlegroups.com>...
> On 11 Aug, 18:53, "Misha Koshelev" <mk144...@bcm.edu> wrote:
> > Dear All:
> >
> > I have a very strange problem. Printing PDFs, same exact code, using R2008a I get a landscape PDF output in landscape orientation:http://people.hnl.bcm.edu/misha/tmp/R2008a.pdf
> >
> > Using R14SP3 I get it "landscape" but in a portrait PDF:http://people.hnl.bcm.edu/misha/tmp/R14SP3.pdf
>
> ...and the problem is...?
>
> You don't want to use full-size landscape pagesizes for
> figures to be included in LaTeX documents. Instead,
> manipulate the PAPERSIZE and PAPERPOSITION properties
> to match the figure sizes you want.
>
> Rune

Thank you. I use scaling in LaTeX but what did it was:

fig = figure('visible', 'off', ...
   'PaperSize', [11 8.5], ...
   'PaperPosition', [0 0 11 8.5]);

Misha

Subject: PDFs, paper orientation, version differences

From: Misha Koshelev

Date: 11 Aug, 2009 20:29:04

Message: 4 of 5

"Misha Koshelev" <mk144210@bcm.edu> wrote in message <h5sdsn$m2e$1@fred.mathworks.com>...
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <a02b2546-8696-4010-8529-0bd7f2b232ed@b14g2000yqd.googlegroups.com>...
> > On 11 Aug, 18:53, "Misha Koshelev" <mk144...@bcm.edu> wrote:
> > > Dear All:
> > >
> > > I have a very strange problem. Printing PDFs, same exact code, using R2008a I get a landscape PDF output in landscape orientation:http://people.hnl.bcm.edu/misha/tmp/R2008a.pdf
> > >
> > > Using R14SP3 I get it "landscape" but in a portrait PDF:http://people.hnl.bcm.edu/misha/tmp/R14SP3.pdf
> >
> > ...and the problem is...?
> >
> > You don't want to use full-size landscape pagesizes for
> > figures to be included in LaTeX documents. Instead,
> > manipulate the PAPERSIZE and PAPERPOSITION properties
> > to match the figure sizes you want.
> >
> > Rune
>
> Thank you. I use scaling in LaTeX but what did it was:
>
> fig = figure('visible', 'off', ...
> 'PaperSize', [11 8.5], ...
> 'PaperPosition', [0 0 11 8.5]);
>
> Misha

Actually, sadly, even this seems to not always be consistent, even on the same computer and on the same MATLAB version (I can post code but it seems rather quirky - using bar objects, for example, length of ylabel causes inversion).

Misha

Subject: PDFs, paper orientation, version differences

From: Misha Koshelev

Date: 12 Aug, 2009 01:26:04

Message: 5 of 5

"Misha Koshelev" <mk144210@bcm.edu> wrote in message <h5skag$3rv$1@fred.mathworks.com>...
> "Misha Koshelev" <mk144210@bcm.edu> wrote in message <h5sdsn$m2e$1@fred.mathworks.com>...
> > Rune Allnor <allnor@tele.ntnu.no> wrote in message <a02b2546-8696-4010-8529-0bd7f2b232ed@b14g2000yqd.googlegroups.com>...
> > > On 11 Aug, 18:53, "Misha Koshelev" <mk144...@bcm.edu> wrote:
> > > > Dear All:
> > > >
> > > > I have a very strange problem. Printing PDFs, same exact code, using R2008a I get a landscape PDF output in landscape orientation:http://people.hnl.bcm.edu/misha/tmp/R2008a.pdf
> > > >
> > > > Using R14SP3 I get it "landscape" but in a portrait PDF:http://people.hnl.bcm.edu/misha/tmp/R14SP3.pdf
> > >
> > > ...and the problem is...?
> > >
> > > You don't want to use full-size landscape pagesizes for
> > > figures to be included in LaTeX documents. Instead,
> > > manipulate the PAPERSIZE and PAPERPOSITION properties
> > > to match the figure sizes you want.
> > >
> > > Rune
> >
> > Thank you. I use scaling in LaTeX but what did it was:
> >
> > fig = figure('visible', 'off', ...
> > 'PaperSize', [11 8.5], ...
> > 'PaperPosition', [0 0 11 8.5]);
> >
> > Misha
>
> Actually, sadly, even this seems to not always be consistent, even on the same computer and on the same MATLAB version (I can post code but it seems rather quirky - using bar objects, for example, length of ylabel causes inversion).
>
> Misha

Fyi for any poor souls with this same problem I now print:
-depsc

Then for pdflatex I use:
\usepackage{graphicx, epstopdf}

And run pdflatex with:
pdflatex --shell-escape file

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us