10

recognize this simple example:

\documentclass[]{article}
\usepackage[paperwidth=612.0pt, paperheight=792.0pt]{geometry}

\begin{document}
Hello World
\end{document}

I compiled it with pdflatex. Additionally I wrote this small Java-Programm (using the iText library):

PdfReader reader = new PdfReader("example.pdf");
Rectangle psize = reader.getPageSize(1);
System.out.println(psize.getHeight());
System.out.println(psize.getWidth());

The result:

Height: 789.041
Width: 609.714

Why is the paperwidth and paperheight different to the tex?

Dennis
  • 819
  • 9
  • 17

1 Answers1

13

Because the unit is different. 1 point for TeX is 1/72.27 in, while many other programs use a PostScript point, which is 1/72 in. This is called a big point (bp) in TeX.

See also What are the various units (ex, em, in, pt, bp, dd, pc) expressed in mm?

Torbjørn T.
  • 206,688
  • I'm using TeX for some years now. I never heard about the unit bp. With bp the program returns the expected geometry. Thanks! – Dennis Oct 07 '11 at 01:26
  • Besides a huge log file, are there other drawbacks of using pdf figures in "pt" and latex uses "bp"? – strauberry Aug 26 '14 at 13:26
  • @strauberry I don't really see how this relates to the size of the log file. And I don't see how it is a drawback either, any more than specifying the size of the figures in centimeters or inches is a drawback -- it is a different unit, so you need to make sure to calculate the correct size. – Torbjørn T. Aug 26 '14 at 13:33