# [OS X TeX] Incompatibility between geometry and TeX+ghostscript

Maarten Sneep maarten.sneep at xs4all.nl
Wed May 16 18:08:22 EDT 2007

On May 16, 2007, at 23:53, André Bellaïche wrote:

> When I use pdftex, and the geometry package, the pdf obtained has
> the same size I have specified as options in geometry, say 15 x 21 cm.
>
> When I use TeX+ghostscript (by specifying %!TEX TS-program = latex
> at the first line of the source file), the pdf obtained is A4 size,
> whatever size has been specified.
>
> This would not be an issue if my source file did not contain
> pictures made with epic and eepic, which are definitely
> incompatible with pdftex. When I run pdftex on my source file with
> these pictures, I get hundreds of time the error message : Non-PDF
> special ignored!
>
> I really need to get PDF of the true size. Any idea ?

This was discussed recently, see archives. the pdftex detection by
geometry is off, and you need to help it a bit.

Short solution:

\documentclass....

\usepackage{ifpdf}

\ifpdf
\usepackge{geometry}
\else
\usepackge[dvips]{geometry} %or perhaps dvipdfm as option
\fi

....

\begin{document}

....

HTMH,

Maarten