Unexpected white gap (4mm wide) between edge of PDF page and start of a background
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
When processing my document with ConTeXt, I do not understand why there appears a gap between the leftmost edge of my PDF document and the left edge of my background layer.
I have made an MWE which exhibits this behavior:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
I also tried with hoffset instead of x, with the same result.
This gap can be canceled by setting a hoffset to -4mm. But why does it appear in the first place ? am I missing something ?
(note : In order to be sure that it's not a PDF-viewer-specific behavior, I checked the resulting PDF using evince, xpdf and okular)
context
add a comment |Â
up vote
5
down vote
favorite
When processing my document with ConTeXt, I do not understand why there appears a gap between the leftmost edge of my PDF document and the left edge of my background layer.
I have made an MWE which exhibits this behavior:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
I also tried with hoffset instead of x, with the same result.
This gap can be canceled by setting a hoffset to -4mm. But why does it appear in the first place ? am I missing something ?
(note : In order to be sure that it's not a PDF-viewer-specific behavior, I checked the resulting PDF using evince, xpdf and okular)
context
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
When processing my document with ConTeXt, I do not understand why there appears a gap between the leftmost edge of my PDF document and the left edge of my background layer.
I have made an MWE which exhibits this behavior:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
I also tried with hoffset instead of x, with the same result.
This gap can be canceled by setting a hoffset to -4mm. But why does it appear in the first place ? am I missing something ?
(note : In order to be sure that it's not a PDF-viewer-specific behavior, I checked the resulting PDF using evince, xpdf and okular)
context
When processing my document with ConTeXt, I do not understand why there appears a gap between the leftmost edge of my PDF document and the left edge of my background layer.
I have made an MWE which exhibits this behavior:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
I also tried with hoffset instead of x, with the same result.
This gap can be canceled by setting a hoffset to -4mm. But why does it appear in the first place ? am I missing something ?
(note : In order to be sure that it's not a PDF-viewer-specific behavior, I checked the resulting PDF using evince, xpdf and okular)
context
asked Aug 14 at 9:07
lmsteffan
1283
1283
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
11
down vote
accepted
You have a spurious space in your code:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]% <--
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
11
down vote
accepted
You have a spurious space in your code:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]% <--
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
add a comment |Â
up vote
11
down vote
accepted
You have a spurious space in your code:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]% <--
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
add a comment |Â
up vote
11
down vote
accepted
up vote
11
down vote
accepted
You have a spurious space in your code:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]% <--
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
You have a spurious space in your code:
definelayer[mybkgr][x=0mm,y=0mm,
width=paperwidth,height=paperheight]
setupbackgrounds[page][background=mybkgr]
setlayer[mybkgr][x=0mm,y=10cm]% <--
blackrule[height=0.3paperheight,
width=paperwidth,color=orange]
starttext
strut
stoptext
answered Aug 14 at 9:12
Ulrike Fischer
177k7280646
177k7280646
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f445980%2funexpected-white-gap-4mm-wide-between-edge-of-pdf-page-and-start-of-a-backgrou%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password