Unexpected white gap (4mm wide) between edge of PDF page and start of a background

The name of the pictureThe name of the pictureThe name of the pictureClash 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)







share|improve this question
























    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)







    share|improve this question






















      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)







      share|improve this question












      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)









      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 14 at 9:07









      lmsteffan

      1283




      1283




















          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


          enter image description here






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "85"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            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






























            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


            enter image description here






            share|improve this answer
























              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


              enter image description here






              share|improve this answer






















                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


                enter image description here






                share|improve this answer












                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


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 14 at 9:12









                Ulrike Fischer

                177k7280646




                177k7280646






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    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













































































                    這個網誌中的熱門文章

                    How to combine Bézier curves to a surface?

                    Carbon dioxide

                    Why am i infinitely getting the same tweet with the Twitter Search API?