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

PDFs stuck in A4 ... ?

4 views
Skip to first unread message

Richard Rudie

unread,
Jul 25, 2002, 5:51:36 PM7/25/02
to
I write a LaTeX file with a typical preamble:

\documentclass[letterpaper]{article}

If I run it through MiKTeX's `latex` and the DVI file comes out properly as
8.5x11" letter paper. But when I run it through `pdflatex` the PDF file
comes out as 8.27x11.69" A4 paper. And strangely, if I use [legalpaper] then
it comes out as legal-sized text blocks hanging off of A4 paper; if I use
[a5paper] then it comes out as A4-sized text blocks drowning on an A5 page.

Does anyone know why this is happening, or what I can do about it?

I've found that using hyperref with [letterpaper] produces the correct
letter-sized output, but then it creates havoc with my table of contents and
cross-references, which would be fine for an online PDF but not for the
academic papers I'm writing for print.
So, is there some package that's like hyperref without the hyperlinks? Or
can someone tell how to turn off the hyperlinking? (I tried
[colorlinks=false] and it had no effect.)


TIA

David Kastrup

unread,
Jul 25, 2002, 7:32:49 PM7/25/02
to
Richard Rudie <rsqu...@geek.com> writes:

> I write a LaTeX file with a typical preamble:
>
> \documentclass[letterpaper]{article}
>
> If I run it through MiKTeX's `latex` and the DVI file comes out properly as
> 8.5x11" letter paper. But when I run it through `pdflatex` the PDF file
> comes out as 8.27x11.69" A4 paper. And strangely, if I use [legalpaper] then
> it comes out as legal-sized text blocks hanging off of A4 paper; if I use
> [a5paper] then it comes out as A4-sized text blocks drowning on an A5 page.
>
> Does anyone know why this is happening, or what I can do about it?
>
> I've found that using hyperref with [letterpaper] produces the correct
> letter-sized output, but then it creates havoc with my table of contents and
> cross-references, which would be fine for an online PDF but not for the
> academic papers I'm writing for print.
> So, is there some package that's like hyperref without the
> hyperlinks?

\usepackage{geometry} will also pass the paper size through.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David....@t-online.de

Heiko Oberdiek

unread,
Jul 25, 2002, 8:39:01 PM7/25/02
to
Richard Rudie <rsqu...@geek.com> wrote:

> I write a LaTeX file with a typical preamble:
>
> \documentclass[letterpaper]{article}
>
> If I run it through MiKTeX's `latex` and the DVI file comes out properly as
> 8.5x11" letter paper. But when I run it through `pdflatex` the PDF file
> comes out as 8.27x11.69" A4 paper. And strangely, if I use [legalpaper] then
> it comes out as legal-sized text blocks hanging off of A4 paper; if I use
> [a5paper] then it comes out as A4-sized text blocks drowning on an A5 page.
>
> Does anyone know why this is happening, or what I can do about it?
>
> I've found that using hyperref with [letterpaper] produces the correct
> letter-sized output,

Yes hyperref does the job. Another package is "geometry".
Or you can do it by hand:
\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}

Yours sincerely
Heiko <ober...@uni-freiburg.de>

Richard Rudie

unread,
Jul 25, 2002, 11:07:43 PM7/25/02
to
On Fri, 26 Jul 2002, Heiko Oberdiek <ober...@uni-freiburg.de> wrote:

> Yes hyperref does the job. Another package is "geometry".
> Or you can do it by hand:
> \setlength{\pdfpagewidth}{\paperwidth}
> \setlength{\pdfpageheight}{\paperheight}

Yes, I had tried geometry, too, but then all the margins changed around.
Setting it by hand works, and doesn't change anything else, and so I will
use that. Thanks.

Ulrike Fischer

unread,
Jul 26, 2002, 3:32:03 AM7/26/02
to
Richard Rudie <rsqu...@geek.com> schrieb:

The default page dimensions of pdftex are stored in pdftex.cfg:
page_width 210 true mm
page_height 297 true mm

The default of dvips is stored in config.ps.

From textflow_doc.txt:

"In <texmf>/dvips/config there is a file named config.ps. (Note that
UNIX users will require root privileges to alter this file.) Edit
config.ps using a text editor. Toward the latter part of the file,
there are lines that begin with "@". These control the paper size
selections. The first set of these lines determines the default paper
size dvips will use. If this first set of lines does not specify the
desired default paper size, another set of lines can be moved or
entered into the first position. For example, putting:

@ letterSize 8.5in 11in
@+ %%PaperSize: Letter

(with a blank line before and after) as the first set of "@" lines will
make dvips will default to using US letter paper.

Now, there are two types of dvips paper size commands. The first type
adds only paper size *comments* to the PostScript output:

@ A4size 210mm 297mm
@+ %%PaperSize: A4

The @+ line says to place the PostScript comment "%% PaperSize: A4" into
the output file. Such PostScript DSC (Document Structuring Convention)
comments are just hints, or suggestions about which type of paper to
use. In fact many/most PostScript interpreters (Ghostscript, printers)
will just ignore these and use their own default paper sizes. In a way,
this is desirable as the comments will not cause any problems if the
PostScript file is then printed on paper of different size than the
comments suggest.

A second type of dvips paper size command adds a PostScript command
which actively sets and enforces a given paper size:

@ a4 210mm 297mm
@+ ! %%DocumentPaperSizes: a4
@+ %%BeginPaperSize: a4
@+ a4
@+ %%EndPaperSize

Note the three comments (The "!" just means place the comment at the
beginning of the PostScript file.) and the "a4" PostScript command.

Therefore, PostScript produced via "dvips -t A4size ..." is different
from that produced with "dvips -t a4 ...". The former may not always
be automatically identified as wanting A4 paper, the latter may demand
A4 - causing some printers to refuse to print on anything other than A4
paper."

Ulrike Fischer

G-Man

unread,
Jul 30, 2002, 6:11:41 PM7/30/02
to
I just recently found the answer to this.
Once you create your .dvi file you should run:

dvipdfm -p legal filename.dvi

under MiKTeX.

Hope this helps.
Best,
G-Man

0 new messages