# 2 cups, 1 libreoffice (setting up printer paper)

## eccerr0r

Not sure where this goes but it is somewhat of a hardware issue, pieces of paper are hard copies...

Hardware:  

CUPS server -> jetdirect -> printer

Client CUPS machine -> CUPS server (IP)

Issue is:  I've got Libreoffice open.  I specify that I'm trying to print on a #10 envelope.  However when sent to the local CUPS server to the CUPS server, this information gets lost and it assumes I'm printing on an letter sized piece of paper, and the #10 envelope gets printed wrong.

Anyway, what do people do when specifying printer paper?  Do both CUPS need to be set to the paper that's loaded into the printer?  I tried manually setting both CUPS to default to a #10 envelope, which then results in a properly printed envelope.  However as both need to be logged into root manually, this is extremely cumbersome.

Ideally both CUPS should take what Libreoffice says is installed in the printer... or should it?  I suppose on a multiuser system, this might not be the best way to handle things, but for a small system this is acceptable for me.

BTW, #10 envelope is about 1/3 the size of a 'letter' piece of paper, both are inserted into the printer portrait orientation.

----------

## charles17

 *eccerr0r wrote:*   

> Issue is:  I've got Libreoffice open.  I specify that I'm trying to print on a #10 envelope.  However when sent to the local CUPS server to the CUPS server, this information gets lost and it assumes I'm printing on an letter sized piece of paper, and the #10 envelope gets printed wrong..

 

Assume you already searched the online help for printdialog and comboPageFormat?

Maybe selecting another »Paper tray« (same dialog where Paper Format) does something helpful

----------

## eccerr0r

Libreoffice knows about the right "paper" - I've set it to be a #10 envelope and the WYSIWYG layout output does have it showing up (albeit in landscape) - this is using the Page Style dialog.  When going through the print dialog boxes of Libreoffice's "properties" the page size is actually correct, but grayed out so I can't actually change it to the wrong type.

Alas it still prints as if it were on a 8.5x11" sheet of paper and the only things I could find that were set as letter-sized was on (both) of the CUPS configuration defaults...

I don't know what would happen if the printer was connected locally.  Technically I could simply set the local CUPS to use the jetdirect directly as an experiment, but I'd rather eventually everything go through one server to do postscript rendering.  I might have to do this to at least see where the breakdown is happening...

I don't recall this cups-to-cups setup every working properly (though regular letter sized prints were always working fine).  I used to print from an openoffice running on the server, and this setup was working just fine.

Odd.

----------

## charles17

Do the lpstat and related commands give any useful information?

```
lpstat -d -l -t
```

----------

## gerard27

I have a similar problem with my Epson printer.

To print correctly from different programs that can print I do this:

Open your browser and then enter "localhost:631" in the address space.

This will open cups,click on printer.

You'll get the name of your printer,click it.

You'll now get a window containing "maintenance and administration"

Click the down button on administration.

In the dropdown menu you'll see "set default options".

Open it and set it for the envelope (if available).

I have to do this every time I want to print on a different size or paper type.

Good luck,

Gerard.

----------

## eccerr0r

```
client ~ $ lpstat -d -l -t

no system default destination

scheduler is running

no system default destination

device for laserjet: lpd://printserver/laserjet-jetdirect

laserjet accepting requests since Mon 21 Aug 2017 11:07:52 AM MDT

printer laserjet is idle.  enabled since Mon 21 Aug 2017 11:07:52 AM MDT

   Form mounted:

   Content types: any

   Printer types: unknown

   Description: laserjet

   Alerts: none

   Location: laserjet

   Connection: direct

   Interface: /etc/cups/ppd/laserjet.ppd

   On fault: no alert

   After fault: continue

   Users allowed:

      (all)

   Forms allowed:

      (none)

   Banner required

   Charset sets:

      (none)

   Default pitch:

   Default page size:

   Default port settings:

```

```
printserver:~$ lpstat -d -l -t

system default destination: laserjet-jetdirect

scheduler is running

device for laserjet-jetdirect: socket://jetdirect

laserjet-jetdirect accepting requests since Mon 21 Aug 2017 11:15:52 AM MDT

printer laserjet-jetdirect is idle.  enabled since Mon 21 Aug 2017 11:15:52 AM MDT

   Waiting for printer to finish.

   Form mounted:

   Content types: any

   Printer types: unknown

   Description: laserjet on jetdirect

   Alerts: none

   Location: system office

   Connection: direct

   Interface: /etc/cups/ppd/laserjet-jetdirect.ppd

   On fault: no alert

   After fault: continue

   Users allowed:

      (all)

   Forms allowed:

      (none)

   Banner required

   Charset sets:

      (none)

   Default pitch:

   Default page size:

   Default port settings:

```

It's curious it says "waiting for finish" but it prints new jobs just fine.

 *gerard27 wrote:*   

> I have to do this every time I want to print on a different size or paper type. 

 

YES, this is exactly what I found to force it to work - though I assumed that I had to do this for both the client CUPS and the server CUPS - which is painful if I have to do both each time I change media.  I wish that OO/LO will somehow transmit the paper information with the job.

Are you using double CUPS or is this happening on a local printer too?  I know that it *was* working just fine in the past because all I had to do is set the paper in OO/LO and it would print on the #10 envelopes just fine.

I just don't remember when this stopped working.

----------

## gerard27

hi eccerr0r,

I don't know what you mean by double CUPS.

My printer is connected by USB.

Gerard.

----------

## eccerr0r

Ah ha!  So it sounds like single CUPS (your client program is accessing CUPS on localhost, which is connected to the printer directly).

So this broke for even this setup...  I was a bit frustrated with this issue because the printer is attached to another machine and I'll be darned I have to change paper types for both machines (not to mention the admin page on the server is only available to its localhost for security reasons just like the client.)

----------

## charles17

eccerr0r,

Does that problem exist only with OO/LO or also with other applications, say firefox.  

Sorry if you already mentioned this in the thread - I can't find.

----------

## eccerr0r

I didn't try Firefox as I do not need to print envelopes with Firefox...  Might be worth a try but I'll need to make some "fake envelopes" or cut some non-Letter sized sheets to try printing on (lucky metric paper...sometimes wish that the USA used A4 paper like the rest of the world...)

----------

## gerard27

Hi again eccerr0r,

My previous printer was an Epson RX560.

That one had a ppd in cups and it always used the paper size and type provided by the program.

But Epson now only provides .deb and .rpm Linux LSB3.2 drivers.

Gentoo doesn't use LSB,but I found out how you could simulate this with a symlink in /lib.

Never a dull moment when printing in Linux!

Gerard.

Edit:Not only paper.

Do you still use "gauge numbers" for electric wiring?

----------

## charles17

 *eccerr0r wrote:*   

> I didn't try Firefox as I do not need to print envelopes with Firefox...  

 

If you stored a #10 envelope formatted pdf document you could try using the lp command with -o media=size option (see the lp manpage). When the problem persists it is a cups problem.

----------

## eccerr0r

cups is not inspiring much confidence when 

```
$ lp -d laserjet-jetdirect -omedia=dvdrw
```

seems to come up as a valid command on the command line...

----------

## charles17

 *eccerr0r wrote:*   

> cups is not inspiring much confidence when 
> 
> 

 

Maybe that's the reason why the Printing wiki article does not mention anything about printing but reads more like a cups installation guide?

----------

## eccerr0r

I don't know if you tried the old lpd that Linux used to come with, alas the built in support for printer driver filters seems to be the best "feature" CUPS came with.  Alas one could even say CUPS is feature bloat much like other software in the Linux world...

----------

