assuming I want add crop marks to pdf (directly to pdf) How can I do this
task? I'm working in Linux but, if any program is, working in wine, I can
use this in Linux
--
Puppy Linux wiki: http://puppylover.netsons.org/dokupuppy
Puppy Linux Forum: http://puppylinux.ilbello.com
Windows me genuit, Ubuntu rapuere / tenet nunc Puppy Linux...
Unfortunately there's a serious lack of PDF tools for Linux at the
moment. What you're trying to do could be accomplished on Windows
using PDF Enhancer or either Quite Imposing or PitStop Pro, which are
both plug-ins for Acrobat. But, that's probably not what you're
looking for.
Hopefully someone has a suggestion for a work around because I wasn't
able to find any tools for Linux that would let you add crop marks
directly to a PDF.
Rowan
------------------------------------------------------------------
4xPDF - PDF News, Articles, Tips and Rants
http://www.pdfpdfpdfpdf.com/
You can use pdflatex. If foobar.pdf is a document formatted on
a5paper then you can print it on a4 and add cropmarks by running
pdflatex on a document like below:
\documentclass{article}
\usepackage{pdfpages}
\usepackage[a5paper]{geometry}
\usepackage[cam,a4,center,pdftex]{crop}
\begin{document}
\includepdf[pages=-]{foobar}
\end{document}
If you generate your cropmarks on another blank PDF -- using
OpenOffice, or direct postscript distilled to PDF, or whatever --
pdftk (on Linux) can place them on top of the original.
Or, 20 minutes could get you a java program using the iText library
(in java) that could do the whole thing ab initio.
But pdflatex, as Martin suggests, is even easier if you grok it.
> If you generate your cropmarks on another blank PDF --
[...]
interesting
> using OpenOffice,
[...]
unfortunately OpenOffice don't gives any chance to create automatically
crop marks, but, I can create manually and then export as pdf
> or direct postscript distilled to PDF, or whatever
[...]
with a tryout version of Indesign, I can set a page (17x24 cm in my case)
with same margins as my pdf file and then export with crop marks. Indesign
don't work good in Wine on Linux, but I think yhis feature is available at
least
> pdftk (on Linux) can place them on top of the original.
[...]
as layer? very good, but how do this? what part of pdftk manual I must
read to perform this task?
> You can use pdflatex. If foobar.pdf is a document formatted on a5paper
> then you can print it on a4 and add cropmarks by running pdflatex on a
> document like below:
[...]
Yes, I have already LaTeX package installed, only my trouble is my page
has format 17 x 24 cm, so I don't know if this page format is already in
LaTeX. if not, I think I must add this pageformat before to run your code
You just have to specify which paper size you are using:
% foobar-crop.tex
\documentclass{article}
\usepackage{pdfpages}
\usepackage[paperwidth=17cm,paperheight=24cm]{geometry}
\usepackage[cam,a4,center,pdftex]{crop}
\begin{document}
\includepdf[pages=-]{foobar}
\end{document}
compiling with
$ pdflatex foobar-crop.tex
will get you foobar-crop.pdf.
To see the documentation og the used packages run
$ texdoc geometry
$ texdoc pdfpages
$ texdoc crop
in a terminal.
> as layer? very good, but how do this? what part of pdftk manual I must
> read to perform this task?
Did you try
$ pdftk --help
I think
$ pdftk foobar.pdf stamp crop.pdf output foobar-crop.pdf
should do the job. But the crop marks will not be added as a an
Optional Contents Group (OCG), if that is what you mean by layer.
I don't think that is possible with pdftk.
> I think
>
> $ pdftk foobar.pdf stamp crop.pdf output foobar-crop.pdf
>
> should do the job.
[...]
result of command:
pdftk foobar.pdf stamp crop.pdf output foobar_crop.pdf
Error: Failed to open PDF file:
stamp
Errors encountered. No output created.
Done. Input errors, so no output created.
it seems that don't recognizes *stamp* command, I will further investigate
You can pass the PDF through LaTeX, using the pdfpages package and the
crop package. This does assume, however, that the print-area on each
page of the original PDF is in the same relative place (or at least
shifts predictably, like the L-R margin shift in a book).
///Peter
Did you create the file crop.pdf containing the crop marks you
want to add? I get an error if the file I am trying to use as
stamp does not exist:
Error: Failed to open stamp PDF file:
xyz.pdf
No output created.
> it seems that don't recognizes *stamp* command, I will further investigate
It seems that you need at least version 1.40 of pdftk in order to
have the stamp operation available. If your version of pdftk is
older you will have to update or use the background operation.
From the pdftk version history:
1.40 - September 19, 2006
* Added the stamp operation, a natural complement to the
existing background operation.
> If your version of pdftk is
> older you will have to update or use the background operation
[...]
in fact I was using 1.12 version, I tried today to update pdftk version,
but I have problems with libgcc_s.so.1
libgcc_s.so.1: version `GCC_4.2.
because my libgcc_s.so.1 is not that version and upgrading may cause
system instability
it's possible to do same task without upgrading or not?
> it's possible to do same task without upgrading or not?
As I said you can use the background operation.
Or use the LaTeX approach suggested by Peter Flynn and myself.
> As I said you can use the background operation.
>
> Or use the LaTeX approach suggested by Peter Flynn and myself.
[...]
thanks. solved with pdftk 1.12 and background command but I'll try also
LaTeX way. thanks again