Hi Pascal,
I spend more than one hour on this, to find a clean solution. So please
add this to the wiki.
And if you can, send my a copy of the nice background image (never mind
if not). I felt in love with this, while testing your example.
Anyhow, the cut markings are still lying under the picture (Hans?),
the rest should work. The automatical scaling of the image uses a tricky
method from this mailing list
http://archive.contextgarden.net/message/20070719.232314.12cb4f5f.en.html
Best wishes, Peter
BTW: do you set a bleed|crop-box?
Pascal de Bruijn schrieb:
> Hi,
>
> I'm trying to layout a book for Lulu.com. I'm working with a 9"x6" paper
> size, which is going to be printed on 9.25"x6.25" stock paper to enable
> full bleed printing.
>
> I have managed to get a background image using a background layer.
> However, I don't seem to be able to get it to the right size.
>
> Sample files:
> http://area42.pcode.nl/context/
>
> In the PDF you can see, that I'm stuck with a white edge. I need the
> background picture to fill my entire page with no white left. I also
> need to crop marks to remain on top of the background image.
>
> The supplied background image has the same height/width ratio as the
> stock page. However I would like TeX to stretch the ratio if necessary.
>
> I'd appreciate any suggestion on how to achieve this.
>
> Regards,
> Pascal de Bruijn
\definepapersize[Lulu-Print][width=6.00in,height=9.00in]
\definepapersize[Lulu-Stock][width=6.25in,height=9.25in]
% [ paper ] [ printpaper ]
\setuppapersize[Lulu-Print][Lulu-Stock]
\setuplayout[location=middle,marking=on]
\setuppagenumbering[alternative=doublesided]
\setupbackgrounds[leftpage] [background={Watermark-Left,layer-with-marking}]%
background doesn't work
\setupbackgrounds[rightpage][background={Watermark-Right,layer-with-marking}]
\definelayer[Watermark-Left]
[repeat=yes,width=\printpaperwidth,height=\printpaperheight,
hoffset=-.5\dimexpr\printpaperwidth-\paperwidth,
voffset=-.5\dimexpr\printpaperheight-\paperheight]
\definelayer[Watermark-Right]
[repeat=yes,width=\printpaperwidth,height=\printpaperheight,
hoffset=-.5\dimexpr\printpaperwidth-\paperwidth,
voffset=-.5\dimexpr\printpaperheight-\paperheight]
\setlayer[Watermark-Left][preset=topleft]
{\externalfigure[lowres][maxwidth=\printpaperwidth,maxheight=\printpaperheight,width=10in]}%
width > maxwidth; value doesn't matter
\setlayer[Watermark-Right][preset=topleft]
{\externalfigure[lowres][maxwidth=\printpaperwidth,maxheight=\printpaperheight,width=10in]}
\starttext
\showframe
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fus\-ce commodo.
Curabitur quis metus. Cras
lacus ipsum, lacinia eu, eleifend in, pellentesque quis, tellus. Sed eget sem a
ipsum nonummy
aliquam. Curabitur ut nibh a lectus sagittis bibendum. Praesent egestas sapien
eu risus. Suspendisse
a quam. Nunc volutpat posuere orci. Duis ultrices cursus tellus. Phasellus ante
sapien, pharetra ac,
malesuada condimentum, viverra sit amet, ligula. Donec nisl libero, placerat
nec, euismod eget,
euismod lobortis, eros. Nam posuere interdum neque. Maecenas a lacus. Etiam
semper viverra libero.
Proin ornare accumsan erat. Ut fringilla. Morbi pretium risus nec urna. Nunc
nec ligula vel risus
sodales lobortis. Fusce consectetuer, risus elementum tincidunt vulputate, arcu
turpis porta sem,
vitae feugiat arcu est non elit.
Nulla facilisi. Duis interdum quam ac purus. Morbi commodo lacus lacinia
tortor. Suspendisse
potenti. Nullam dapibus risus at dolor. Donec ac felis eu urna varius
venenatis. Quisque ac sapien
id quam tempor auctor. Donec vel ipsum. Phasellus lorem lacus, iaculis
tristique, pellentesque
vitae, cursus sed, leo. Morbi massa metus, facilisis at, placerat a, varius in,
justo. Vestibulum
vehicula consectetuer sapien. In sodales, orci ac convallis sollicitudin, pede
ligula luctus erat,
ut elementum tellus libero vel urna. Sed scelerisque diam a leo vehicula
nonummy.
Donec velit dui, volutpat ornare, auctor vel, ultricies eu, nulla. Aliquam quis
nisi a nulla
tristique semper. Phasellus varius mi at sapien. Integer ornare, mi id
consequat nonummy, sem purus
pellentesque nibh, eu lobortis neque elit a purus. Nullam nisi. Pellentesque
cursus lectus lobortis
sem. Sed felis. Ut justo libero, malesuada non, congue sit amet, hendrerit
eget, velit. Curabitur
iaculis, diam non tincidunt cursus, tortor odio varius mauris, sed pharetra
augue urna ac erat.
Maecenas eu sapien. Suspendisse vel magna nec metus tempor consectetuer. Sed
mollis tincidunt
lorem. Sed tempus adipiscing tellus. Sed elit odio, venenatis ac, dignissim at,
vehicula eget, ante.
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________