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?

  • Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. – Torbjørn T. Oct 7 '11 at 1:18
  • Thx for your info. – Dennis Oct 7 '11 at 1:29
12

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?

  • 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 7 '11 at 1: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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.