Printing on custom paper size / adding paper size to PPD

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












5














I have some trouble when printing to custom paper sizes. Currently, I want to print something to a 21cm x 21cm card. So, I created a document with this size in libre office and exported it to PDF. The PDF looks fine.



When I want to print the document, the printer dialog has no option for this paper size. If I choose Din A4 (also 21cm wide), strange things happen:




  • Acrobat Reader centers the document on an A4 sheet as it thinks it's printing to A4.


  • Okular aligns the top of the document with the top of the sheet. This would be fine and exactly what I want, but it also crops the upper part of the documents. It looks as if it puts the document top-aligned on the sheet and then erases everything outside a center-aligned box of the same size as the document size.

My current workaround is to create the document in A4 size, aligning the area to be printed to the top of the page. However, this looks odd when creating the document.



I saw that using the --custom option of the printing command may allow this, but I do not want to print the documents from the command line.




So, my question is:



  • How can I print documents of custom page sizes to paper sheets of the same custom size?

  • I saw paper sizes defined in my PPD file. Can I just edit it? Is there a convenient tool for this?

My printer is a brother L2340 laser printer with original cups drivers from brother. I'm running OpenSuse 13.2, cups is 1.5.4 if I'm correct.










share|improve this question




























    5














    I have some trouble when printing to custom paper sizes. Currently, I want to print something to a 21cm x 21cm card. So, I created a document with this size in libre office and exported it to PDF. The PDF looks fine.



    When I want to print the document, the printer dialog has no option for this paper size. If I choose Din A4 (also 21cm wide), strange things happen:




    • Acrobat Reader centers the document on an A4 sheet as it thinks it's printing to A4.


    • Okular aligns the top of the document with the top of the sheet. This would be fine and exactly what I want, but it also crops the upper part of the documents. It looks as if it puts the document top-aligned on the sheet and then erases everything outside a center-aligned box of the same size as the document size.

    My current workaround is to create the document in A4 size, aligning the area to be printed to the top of the page. However, this looks odd when creating the document.



    I saw that using the --custom option of the printing command may allow this, but I do not want to print the documents from the command line.




    So, my question is:



    • How can I print documents of custom page sizes to paper sheets of the same custom size?

    • I saw paper sizes defined in my PPD file. Can I just edit it? Is there a convenient tool for this?

    My printer is a brother L2340 laser printer with original cups drivers from brother. I'm running OpenSuse 13.2, cups is 1.5.4 if I'm correct.










    share|improve this question


























      5












      5








      5


      2





      I have some trouble when printing to custom paper sizes. Currently, I want to print something to a 21cm x 21cm card. So, I created a document with this size in libre office and exported it to PDF. The PDF looks fine.



      When I want to print the document, the printer dialog has no option for this paper size. If I choose Din A4 (also 21cm wide), strange things happen:




      • Acrobat Reader centers the document on an A4 sheet as it thinks it's printing to A4.


      • Okular aligns the top of the document with the top of the sheet. This would be fine and exactly what I want, but it also crops the upper part of the documents. It looks as if it puts the document top-aligned on the sheet and then erases everything outside a center-aligned box of the same size as the document size.

      My current workaround is to create the document in A4 size, aligning the area to be printed to the top of the page. However, this looks odd when creating the document.



      I saw that using the --custom option of the printing command may allow this, but I do not want to print the documents from the command line.




      So, my question is:



      • How can I print documents of custom page sizes to paper sheets of the same custom size?

      • I saw paper sizes defined in my PPD file. Can I just edit it? Is there a convenient tool for this?

      My printer is a brother L2340 laser printer with original cups drivers from brother. I'm running OpenSuse 13.2, cups is 1.5.4 if I'm correct.










      share|improve this question















      I have some trouble when printing to custom paper sizes. Currently, I want to print something to a 21cm x 21cm card. So, I created a document with this size in libre office and exported it to PDF. The PDF looks fine.



      When I want to print the document, the printer dialog has no option for this paper size. If I choose Din A4 (also 21cm wide), strange things happen:




      • Acrobat Reader centers the document on an A4 sheet as it thinks it's printing to A4.


      • Okular aligns the top of the document with the top of the sheet. This would be fine and exactly what I want, but it also crops the upper part of the documents. It looks as if it puts the document top-aligned on the sheet and then erases everything outside a center-aligned box of the same size as the document size.

      My current workaround is to create the document in A4 size, aligning the area to be printed to the top of the page. However, this looks odd when creating the document.



      I saw that using the --custom option of the printing command may allow this, but I do not want to print the documents from the command line.




      So, my question is:



      • How can I print documents of custom page sizes to paper sheets of the same custom size?

      • I saw paper sizes defined in my PPD file. Can I just edit it? Is there a convenient tool for this?

      My printer is a brother L2340 laser printer with original cups drivers from brother. I'm running OpenSuse 13.2, cups is 1.5.4 if I'm correct.







      pdf cups ppd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 17 '15 at 11:34

























      asked Apr 17 '15 at 11:29









      sweber

      26127




      26127




















          2 Answers
          2






          active

          oldest

          votes


















          2














          According to : https://stackoverflow.com/a/3112256/544721 you need to add to your printer's file description four lines in appropriate places describing four properties of your page: PageSize, PageRegion, ImageableArea and PaperDimension.



          Btw. Here is my try of adding description of S0929100 Cards roll to Dymo 450 LabelWriter: https://gist.github.com/gwpl/d6f90e41c5b07cd9f9262e4c6515037d , however it's still work in progress. Hopefully this will give you a hint,
          here is digest of mentioned gist with four lines - each should land in appropriate section of .ppd file:



          *PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
          *PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
          *ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
          *PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"





          share|improve this answer






















          • I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
            – Peter Flynn
            May 6 '17 at 20:46










          • Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
            – Kurt Pfeifle
            Dec 18 at 21:48


















          0














          It's not strange at all that Acrobat Reader centers your 21x21 cm page on an A4 paper. Without a PostScript Printer Description file (PPD), which contains a description of a 21x21 cm page size, Acrobat Reader cannot select such a page size, so it uses its default value.



          1. To be able to actually print on a custom paper size, you need to also load that paper size into your printer. Plus, the printer needs to be able to transport the sheets of this specific size through its paper path. (For a 21x21 cm square sheet, some printers may already fail to do that, because their nip roller design may not be expecting such a "short" paper...)



          2. To be able to select that paper size in a print dialog, that size has to be added into the PPD, and you'll have to manually edit that PPD. How to accomplish that I answered in another question, over at StackOverflow:



            • What's the easiest way to add custom page sizes to a .ppd?






          share|improve this answer




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f196814%2fprinting-on-custom-paper-size-adding-paper-size-to-ppd%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            According to : https://stackoverflow.com/a/3112256/544721 you need to add to your printer's file description four lines in appropriate places describing four properties of your page: PageSize, PageRegion, ImageableArea and PaperDimension.



            Btw. Here is my try of adding description of S0929100 Cards roll to Dymo 450 LabelWriter: https://gist.github.com/gwpl/d6f90e41c5b07cd9f9262e4c6515037d , however it's still work in progress. Hopefully this will give you a hint,
            here is digest of mentioned gist with four lines - each should land in appropriate section of .ppd file:



            *PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
            *PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"





            share|improve this answer






















            • I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
              – Peter Flynn
              May 6 '17 at 20:46










            • Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
              – Kurt Pfeifle
              Dec 18 at 21:48















            2














            According to : https://stackoverflow.com/a/3112256/544721 you need to add to your printer's file description four lines in appropriate places describing four properties of your page: PageSize, PageRegion, ImageableArea and PaperDimension.



            Btw. Here is my try of adding description of S0929100 Cards roll to Dymo 450 LabelWriter: https://gist.github.com/gwpl/d6f90e41c5b07cd9f9262e4c6515037d , however it's still work in progress. Hopefully this will give you a hint,
            here is digest of mentioned gist with four lines - each should land in appropriate section of .ppd file:



            *PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
            *PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"





            share|improve this answer






















            • I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
              – Peter Flynn
              May 6 '17 at 20:46










            • Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
              – Kurt Pfeifle
              Dec 18 at 21:48













            2












            2








            2






            According to : https://stackoverflow.com/a/3112256/544721 you need to add to your printer's file description four lines in appropriate places describing four properties of your page: PageSize, PageRegion, ImageableArea and PaperDimension.



            Btw. Here is my try of adding description of S0929100 Cards roll to Dymo 450 LabelWriter: https://gist.github.com/gwpl/d6f90e41c5b07cd9f9262e4c6515037d , however it's still work in progress. Hopefully this will give you a hint,
            here is digest of mentioned gist with four lines - each should land in appropriate section of .ppd file:



            *PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
            *PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"





            share|improve this answer














            According to : https://stackoverflow.com/a/3112256/544721 you need to add to your printer's file description four lines in appropriate places describing four properties of your page: PageSize, PageRegion, ImageableArea and PaperDimension.



            Btw. Here is my try of adding description of S0929100 Cards roll to Dymo 450 LabelWriter: https://gist.github.com/gwpl/d6f90e41c5b07cd9f9262e4c6515037d , however it's still work in progress. Hopefully this will give you a hint,
            here is digest of mentioned gist with four lines - each should land in appropriate section of .ppd file:



            *PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
            *ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
            *PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 12:40









            Community

            1




            1










            answered May 1 '16 at 19:42









            Grzegorz Wierzowiecki

            5,2101361104




            5,2101361104











            • I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
              – Peter Flynn
              May 6 '17 at 20:46










            • Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
              – Kurt Pfeifle
              Dec 18 at 21:48
















            • I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
              – Peter Flynn
              May 6 '17 at 20:46










            • Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
              – Kurt Pfeifle
              Dec 18 at 21:48















            I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
            – Peter Flynn
            May 6 '17 at 20:46




            I just installed the latest version of HPLIP. How do I find out where the .ppd file is for the printer I configured?
            – Peter Flynn
            May 6 '17 at 20:46












            Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
            – Kurt Pfeifle
            Dec 18 at 21:48




            Once you installed a print queue named XYZ with a PPD, the respective PPD will be placed as /etc/cups/ppd/XYZ.ppd.
            – Kurt Pfeifle
            Dec 18 at 21:48













            0














            It's not strange at all that Acrobat Reader centers your 21x21 cm page on an A4 paper. Without a PostScript Printer Description file (PPD), which contains a description of a 21x21 cm page size, Acrobat Reader cannot select such a page size, so it uses its default value.



            1. To be able to actually print on a custom paper size, you need to also load that paper size into your printer. Plus, the printer needs to be able to transport the sheets of this specific size through its paper path. (For a 21x21 cm square sheet, some printers may already fail to do that, because their nip roller design may not be expecting such a "short" paper...)



            2. To be able to select that paper size in a print dialog, that size has to be added into the PPD, and you'll have to manually edit that PPD. How to accomplish that I answered in another question, over at StackOverflow:



              • What's the easiest way to add custom page sizes to a .ppd?






            share|improve this answer

























              0














              It's not strange at all that Acrobat Reader centers your 21x21 cm page on an A4 paper. Without a PostScript Printer Description file (PPD), which contains a description of a 21x21 cm page size, Acrobat Reader cannot select such a page size, so it uses its default value.



              1. To be able to actually print on a custom paper size, you need to also load that paper size into your printer. Plus, the printer needs to be able to transport the sheets of this specific size through its paper path. (For a 21x21 cm square sheet, some printers may already fail to do that, because their nip roller design may not be expecting such a "short" paper...)



              2. To be able to select that paper size in a print dialog, that size has to be added into the PPD, and you'll have to manually edit that PPD. How to accomplish that I answered in another question, over at StackOverflow:



                • What's the easiest way to add custom page sizes to a .ppd?






              share|improve this answer























                0












                0








                0






                It's not strange at all that Acrobat Reader centers your 21x21 cm page on an A4 paper. Without a PostScript Printer Description file (PPD), which contains a description of a 21x21 cm page size, Acrobat Reader cannot select such a page size, so it uses its default value.



                1. To be able to actually print on a custom paper size, you need to also load that paper size into your printer. Plus, the printer needs to be able to transport the sheets of this specific size through its paper path. (For a 21x21 cm square sheet, some printers may already fail to do that, because their nip roller design may not be expecting such a "short" paper...)



                2. To be able to select that paper size in a print dialog, that size has to be added into the PPD, and you'll have to manually edit that PPD. How to accomplish that I answered in another question, over at StackOverflow:



                  • What's the easiest way to add custom page sizes to a .ppd?






                share|improve this answer












                It's not strange at all that Acrobat Reader centers your 21x21 cm page on an A4 paper. Without a PostScript Printer Description file (PPD), which contains a description of a 21x21 cm page size, Acrobat Reader cannot select such a page size, so it uses its default value.



                1. To be able to actually print on a custom paper size, you need to also load that paper size into your printer. Plus, the printer needs to be able to transport the sheets of this specific size through its paper path. (For a 21x21 cm square sheet, some printers may already fail to do that, because their nip roller design may not be expecting such a "short" paper...)



                2. To be able to select that paper size in a print dialog, that size has to be added into the PPD, and you'll have to manually edit that PPD. How to accomplish that I answered in another question, over at StackOverflow:



                  • What's the easiest way to add custom page sizes to a .ppd?







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 18 at 22:02









                Kurt Pfeifle

                47038




                47038



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f196814%2fprinting-on-custom-paper-size-adding-paper-size-to-ppd%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay