Proposal: GUI to switch between a4 and letter paper

Forum Forums antiX-development Development Proposal: GUI to switch between a4 and letter paper

  • This topic has 9 replies, 5 voices, and was last updated Jan 30-3:23 pm by PPC.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #98325

      My new desktop refused to accept A4 as default paper size, forcing me to select it each time I wanted to print something, so I wrote this script.

      I tested, and the change sticks in LibreOffice, OpenOffice, geany, firefox-esr, etc.

      Proposed script (ready for localization):

      #Tiny GUI script tp allow users to select paper size in antiX, by PPC, GPL licence
      text=$"Change Default Printer Paper size"
      current_size=$"The current size is: "
      gksu "$text"
      current_paper_size=$(cat /etc/papersize)
      yad --window-icon="/usr/share/icons/antix-numix-bevel/printer.png" --title="$text" --center --fixed --form --text=$"\n $text : \n \n $current_size is $current_paper_size \n" --button="letter":1 --button="A4":2
      if [[ $foo -eq 1 ]]; then
       sudo bash -c 'echo "letter" > /etc/papersize'
      if [[ $foo -eq 2 ]]; then
       sudo bash -c 'echo "a4" > /etc/papersize'

        Thanks PPC, hope this papersize setup will be included in antiX23.

        For a4 users.
        Libreoffice can be somewhat involved, it works correctly only when documents are created in a4 format.
        A best practice is to have an a4 standard document template.

        To work on a new a4 document select Format > Page > Page tab, then the desired format there, e.g. a4
        standard in LO is US Letter 8.5×11 inches.

        To set up the page size when you print the document in Writer, you select File > Print > General tab,
        and there you select the desired printer. Then you click the Properties button below and to the right
        of the Printers box, and select the desired print format there, e.g. A4 (8.27×11.69 inches).
        In the PRINT Dialog
        Click the OPTIONS tab

        Similar proceedure for other LO Modules like Calc.


          Not sure what to think about it. I have never seen any issues on a German localised antiX, all programs installed show me A4 format as default when trying to print something. I did not modify any files in /etc/papersize.

          Under what conditions it is not set to A4 in the printing dialog?

          Strange enough:
          cat /etc/papersize
          gives me back

          Obviously no program reads from this entry, since they all default to A4.

          Windows is like a submarine. Open a window and serious problems will start.


            all programs installed show me A4 format as default when trying to print something. I did not modify any files in /etc/papersize.

            Yep, same here.


              Regarding, Obviously no program reads from this entry, since they all default to A4

              Interesting, my system and those of several others I support must be suffering
              from delusion as without setting papersize and cups default paper size printouts
              do not fit pages correctly. Brother, Siemens, Samsung and Canon Printers involved.

              Standard document template is used for setup.


                To try and get this thread back to hard facts.

                And informative content

                As one example Libreoffice default is LETTER not A4. From LO Org Docs.
                To prepare documents adhering to normative requirements the most convenient method
                is a template. Again following LO recommendations.

                Printers do not communicate to programmes what is in a papertray.
                Institutions of many kinds specify exact document formats which must be
                adhered to for acceptance.

                Reason many are included in DIN ISO norms.

                Educational institutions specify exactly what is acceptable for submission.
                If work is submitted in any other form it is rejected. Same as non submission
                a fail.
                Every submission is checked with a template, either manualy or with a scanning system.

                To acheive correct printing across a range of devices settings must be consistent
                and correct.

                For multiple carbon copy forms a screen mask is usualy used to enter data, manualy or
                extracted. To get data in to required fields with the neccesary accuracy all parts of
                the document creation chain must be correctly setup.

                Localy both Needle and Pinwheel printers are used for such cases.

                Reading Papersize man page is helpful.

                The papersize file is used to specify the preferred paper size to use by available commands and programs generating documents.

                The format of this file is extremely simple: whitespace and anything starting with ‘#’ is ignored, and the name of the paper is the first string found; the case in the name of the paper does not import (see CAVEATS section however).
                Paper Names: The following names are commonly understood by programs: a3, a4, a5, b5, letter, legal,executive, note and 11×17.

                Additional paper names that one may encounter are: a0, a1, a2, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, tabloid, statement,note, halfletter, halfexecutive, folio, quarto, ledger, archA, archB, archC,archD, archE, flsa, flse, csheet, dsheet, esheet and 10×14.

                The value of the papersize file can be overriden by looking in order at the PAPERSIZE environment variable, then at the contents of the file specified by the PAPERCONF environment variable.

                If the papersize file does not exist, programs using the paper library default to using letter as a fall-back value.

                For completeness another Debian config way.
                By reconfiguring the libpaper1 package. do $ sudo dpkg-reconfigure libpaper1
                and select the desired paper size. completion will save it to /etc/papersize.
                Should you be using tex it setsup config hooks for that at same time according to some posts on stack exchange.

                • This reply was modified 1 year, 2 months ago by Xunzi_23.
                • This reply was modified 1 year, 2 months ago by Xunzi_23.

                  Dear PPC,

                  This reminds me of my thread that I opened to put the a4 format in antiX.

                  I hope your script will be integrated into antiX. It is a very good idea! It should be placed in the control centre.
                  New users don’t know how to set the paper size in a distribution.
                  I noticed that Debian Gnome environment updates the papersize file directly, in my case to a4. I don’t know why there isn’t a utility to do this in antiX.

                  Best regards,


                    Please forgive my insubordination, but to change the papersize in /etc/papersize does nothing for me here.
                    The way to change papersize here is in printersettings on localhost or using the GUI Wallon already mentioned in his thread.

                    But I will be gladly taught better, if someone explains me a way that it works here by just changing papersize in /etc/papersize( and nothing else does the script)


                      Hi caprea,
                      Printing on linux and often windoze is a mess…
                      As many programmes and utilitys including printer drivers default to
                      letter and ignore system settings.
                      Setting default to a4 in /etc/papersize is one of several steps which
                      may be needed to acheive correctly dimensioned and formatted work, i.e.
                      reproducible printing.

                      Setting on localhost:631 cups interface only sets printer output to a4.
                      That can not correct issues due documents, drawings, images which were
                      created in Letter format.

                      Result is similar to using fit to page, distortion or other dimensional

                      The tool from PPC is a very useful helper application for new users.
                      It is impossible to make a one click fix all solution at present.


                        Hi all – I wrote this script after seeing an old post by Moddit, where he showed several options to set the size of printer paper. Since Zunzi_23 asked for a GUI for this to be included in antiX, and I run into this problem when installing antiX on my new(ish) desktop, I decided to write the tiny script. If it’s to ever be included in antiX, by default, it’s text should read something like:

                        “Please try to first setting paper size using “Printer Settings”, in the Control Panel…
                        The current default size set in the config file /etc/papersize is: ”

                        Also, for our American users, a new option should be available: “legal” – it seems that not only do they not share the same standards as almost the rest of the world, they seem to not have a single standard for “default” paper, although mostly it’s “letter” and for some official documents, it’s “legal”.

                        I tested in my brand new install of antiX 22 and setting a default paper size in the Printer options in the Control Panel did not stick- /etc/papersize was my second try, and, at least, for me, it solved the problem, setting it to A4 for every single application I tested.


                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.