[Tex/LaTex] Paper size with geometry in memoir: LaTeX vs PDFLaTeX

epsgraphicsmemoirpdf

I have been searching for an answer to my problem, but my search did not yield any topics with the same problem, so hereby my question:
I have created a document with the memoir package. The stocksize should be 25 x 18 cm, with trims at 0.5 cm from the borders. The paper will be cutted at 24 x 17 cm, the bleed is to avoid white borders around my full page pictures after cutting the paper.

The code below works perfectly when I build with LaTeX to PS. And then convert the ps to pdf with Acrobat Distiller. However, when using this sequence, pictures are required to be in eps-format.

However, I want to include jpegs or png's (photographs), so therefore I want to build it with pdflatex. However, when building the code below with pdflatex the page size is not correct: it is smaller (i.e., 6.69×9.45inch with pdflatex compared to 7.09×9.84inch with LaTeX).

I have tried to exclude the packages I use to find out which is incompatible, but I did not manage to find out what is causing the problem. Does anyone have an idea?

By the way: at first I just converted my jpg's to eps and builded the pdf with LaTeX. However, the image quality was terrible so therefore, I would like to use pdflatex.

    \documentclass[10pt,showtrims,openright]{memoir}
    \usepackage{eso-pic}% For prechapterpics that have to bleed over the trims
    \usepackage{graphicx} 
    \usepackage{geometry} 
    \usepackage[dutch,british]{babel} 
    \usepackage{booktabs} 
    \usepackage{eurosym} 
    \usepackage{lscape} 
    \usepackage[authoryear]{natbib}  
    \usepackage{threeparttable}   
    \usepackage{multirow}  

    \setstocksize{25cm}{18cm} 
    \settrims{0.5cm}{0.5cm}
    \geometry{paperwidth=17cm, paperheight=24cm}
    \setlrmarginsandblock{3cm}{2cm}{*}%%%% 
    \setulmarginsandblock{2.5cm}{3cm}{*}
    \checkandfixthelayout

    %%%%%%%%%%%%%%%% Newcommand to put the chapterimage in before each chapter
    \newcommand\chapimage[1]{%
    \cleartoverso 
    \noindent%
    \AddToShipoutPictureBG*{% Add picture to current page
      \AtStockLowerLeft{% Add picture to lower-left corner of paper stock
    \includegraphics[keepaspectratio=true, width=\stockwidth]{art/#1}}}%
    \clearpage}%%end Newcommand 

    \title{Title thesis}
    \author{Authorname}
    \date{}

    \begin{document}
    \maketitle
    \chapimage{testimage}  
    \chapter{Title of first chapter}
    \end{document}

Best Answer

I guess that this is what you want (don't load geometry):

\setstocksize{25cm}{18cm} %Finale
\settrimmedsize{24cm}{17cm}{*}
\settrims{0.5cm}{0.5cm}
\setlrmarginsandblock{3cm}{2cm}{*}%%%%
\setulmarginsandblock{2.5cm}{3cm}{*}
\checkandfixthelayout
\fixpdflayout

The summary printed by memoir says

******************************************************
Stock height and width: 711.3189pt by 512.1496pt
Top and edge trims: 14.22636pt and 14.22636pt
Page height and width: 682.86613pt by 483.69684pt
Text height and width: 526pt by 341pt
Spine and edge margins: 85.35826pt and 56.9055pt
Upper and lower margins: 71.13188pt and 85.73425pt
Headheight and headsep: 12pt and 18.06749pt
Footskip: 25.29494pt
Columnsep and columnseprule: 10pt and 0pt
Marginparsep and marginparwidth: 7pt and 128pt
Sidecapsep and sidecapwidth: 7pt and 128pt
Sidebarhsep and sidebarwidth: 7pt and 128pt
Sidebarvsep and sidebartopsep: 12pt and 0pt
Sidebarheight: 548.39996pt
Sidefoothsep and sidefootwidth: 7pt and 128pt
Sidefootvsep and sidefootheight: 12pt and 548.39996pt
******************************************************