5

I'd like to do a document that will be printed by a professional printer. To print it I need to add a margin around the document so that during the page cutting no blank margin will appear. Here is what I want:

  • Be able to display the crop marks above the text, pictures, and tikz (using absolute positionning in the page)
  • Be able to output easily only the document without the margin around the document, without changing anything.

I tried several things, use memoir, beamer, the crop package... But no one allow me to do that easily. Here is an example using the crop package:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage[paperwidth=4in,paperheight=6in,margin=0.25in,bottom=1in,top=1in,nohead]{geometry}
\usepackage[cam,a4,center]{crop}
\begin{document}
Hello
\begin{tikzpicture}[remember picture,overlay]
  \node (back names) [shape=rectangle, fill=blue, minimum height=40mm, minimum width=\paperwidth + 1cm, anchor=south west] at (current page.south west) {};
\end{tikzpicture}
\end{document}

As you can see, the text goes above the crop mark

enter image description here

Any idea ? Thank you !

-- EDIT -- I found a kind of solution here, which uses atbegshi that I adapted to work with the crop package:

\RequirePackage{atbegshi}\AtBeginShipoutInit
\documentclass{article}
\usepackage[paperwidth=4in,paperheight=6in,margin=0.25in,bottom=1in,top=1in,nohead]{geometry}
\usepackage[cam,a4,center,pdftex]{crop}
\usepackage{eso-pic}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
Hello
\null\AddToShipoutPictureBG*{%
  \begin{tikzpicture}[remember picture,overlay]
    \node (back names) [shape=rectangle, fill=blue, minimum height=40mm, minimum width=\paperwidth + 1cm, anchor=south west] at (current page.south west) {};
  \end{tikzpicture}%
}
\end{document}

The idea is to embeed all the images that are supposed to be below the crop mark in the code

\null\AddToShipoutPictureBG*{%
% Write here the image
}

There are however two problems:

  • I don't know how to put the picture above the text AND below the crop marks
  • It's a bit heavy to write
  • EDIT : and I also realize that it was not possible to use AddToShipoutPictureBG* twice...
tobiasBora
  • 8,684
  • Did you run the sample document through pdflatex twice? That is needed for correct positioning of 'remember picture' thingies. – Michael Palmer Oct 17 '17 at 16:11
  • As you are already using the geometry package adding the option showcrop to it seems like the best option. However, it also prints the crop marks under your picture, which is a little surprising as it claims to use the atbegshi package for printing the crop marks... –  Oct 17 '17 at 16:12
  • On another note - I would advise against swapping out document classes just for fiddling with crop marks. Use the most appropriate document class for your content (book, maybe?) and find a way to use crop marks with that. – Michael Palmer Oct 17 '17 at 16:12
  • Although it is not exactly what you have asked for, the novel document class has most of it built-in. Not for use with math. But may I ask, are you really sure you need crop marks? The print services I have used do NOT want crop marks, even when the trim size is smaller than the PDF page size. That's because (in novel class with PDF/X) there is an invisible "TrimBox" that instructs a fully computerized printing machine where to cut. Only when the paper is manually cut by humans, do they want crop marks. –  Oct 17 '17 at 19:32
  • @MichaelPalmer: yes, running pdflatex several times does not change the result. – tobiasBora Oct 17 '17 at 20:35
  • @MichaelPalmer : yes, I don't want to switch document class, I just want to choose the good one. I want to produce at the end a photo book, so I don't mind if it's the class book, beamer, or whatever. – tobiasBora Oct 17 '17 at 20:43
  • @RobtAll: Well, I want crop marks so that I can see if I put the pictures deep enough in the margin to be sure I won't get white margin. At the end, the crop marks will be removed, it's just to help me. – tobiasBora Oct 17 '17 at 20:45

1 Answers1

4

Here is a bit of a kludge. It involves the creation of 3 separate files:

  1. the main file with the actual content,
  2. a separate file that contains nothing but crop marks, and
  3. a wrapper file that uses the pdfpages package to overlay the crop marks on top of the content pages. For example:

File content.tex

\documentclass{article}
\usepackage[papersize={5in,7in},margin=1in,bottom=1in,top=1in,nohead]{geometry}
\usepackage{pgffor,lipsum,graphicx}

\begin{document}

\foreach \x in {1,2, ..., 5}{\lipsum[\x]  \newpage}

\newgeometry{margin=0in}
\includegraphics[height=\paperheight]{/data/graphics/fun/popeye-blue}

\end{document}

File emptycrop.tex

\documentclass{article}
\usepackage[papersize={4in,6in},margin=0.25in,bottom=1in,top=1in,nohead]{geometry}
\usepackage[cam,a4,center,pdftex]{crop}
\usepackage{pgffor}

\pagestyle{empty}

\begin{document}

\foreach \x in {1,2, ..., 10}{\null \newpage}

\end{document}

File wrapper.tex

\documentclass[a4]{article}
\usepackage{pdfpages}
\usepackage{xcolor}% http://ctan.org/pkg/pdfpages

\usepackage[margin=0in]{geometry}

\begin{document}
\makeatletter
\includepdf[
   pages=-,
   noautoscale,
   scale=1,
   picturecommand={\put(0,0){\includegraphics[page=\thepage]{emptycrop}}}]
  {content.pdf}
\makeatother
\end{document}

Note that I defined the paper size for the content a bit larger than for the crop mark file. When you compile them all in sequence, the last page of wrapper.pdf looks like this:

enter image description here

While the three-file setup may be a bit clunky, you don't really have to worry about it most of the time - you only have to do this once at the very end.

  • Thank you, but unfortunately, the crop marks are still below the pictures... – tobiasBora Oct 17 '17 at 20:35
  • @tobiasBora - new answer. – Michael Palmer Oct 17 '17 at 22:22
  • 1
    It seems to work indeed, even if it's a bit complicated ^^ Thank you ! Just a remark: I heard that the trim information is most of the time embedded in the file (I don't know what for). With this solution I guess that these information is lost, but I don't use it now so I think it should be enough for me... Thanks ! – tobiasBora Oct 17 '17 at 23:34
  • Hum, another problem of this solution is that when you choose (current page.north), you will refer in fact to the stock page... – tobiasBora Oct 19 '17 at 18:23
  • Not sure I understand. Stock page as opposed to what? Can you post some sample code to illustrate the problem? – Michael Palmer Oct 19 '17 at 20:52
  • 1
    Stockpage opposed to paper page (stock page includes the margin). Indeed, I want to put the element in the page by saying "current page.north east" for example, and here, if I write that the element will be in the margin that will be croped. But I found a solution : I also open the crop package in the content.tex file, and I disable the frame. – tobiasBora Oct 19 '17 at 21:20