Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I get printers configurations to 'stick'? [RESOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 896
Location: US-FL-EST

PostPosted: Wed Aug 24, 2016 1:24 am    Post subject: How do I get printers configurations to 'stick'? [RESOLVED] Reply with quote

I can't seem to find where to set such thigs as 'default printer' if I only have a single printer.

This is a problem because I want my default printer to be 'pdf'. I explicitly do NOT want my physical printer to be default.

One problem this causes is that when I print a web page to 'pdf', the resulting pdf file is formated using the options of the physical printer. Since my physical printer is a black & white only laser printer, all the web pages I print to pdf are in black and white. If I delete the physical printer, then my resulting pdfs print as expected.

Additionally, I do a lot more printing to 'pdf' than I do to any physical device. This means I currently am required to switch printer destinations for nearly everything I print. Not convienent by any stretch of the imagination.

If I have more than one physical printer, I can apparently go to any one of the physical printers and set that printer as default. But neither 'pdf' nor 'postcript' virtual printers can be accessed this way in order to set them either of them as 'default'.

In addition, while I think I can set paper size to 'letter' on individual print jobs, I can't get that setting to 'stick' in kde system settings. This applies to all other printer options as well such as paper type, print quality, economy setting etc.

What am I missing here?
_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Fri Aug 26, 2016 3:02 am; edited 1 time in total
Back to top
View user's profile Send private message
Section_8
Guru
Guru


Joined: 22 May 2004
Posts: 566
Location: Arlington, TX, US

PostPosted: Wed Aug 24, 2016 3:01 am    Post subject: Reply with quote

Have you looked at net-print/cups-pdf ?
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 896
Location: US-FL-EST

PostPosted: Wed Aug 24, 2016 9:09 am    Post subject: Reply with quote

Section_8 wrote:
Have you looked at net-print/cups-pdf ?

I have the net-print/cups-pdf already installed. And I do have the virtual printer working. There just doesn't seem anyway to set it as my default printer. The only time it comes up as default is when there are no other printers.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1636
Location: United Kingdom

PostPosted: Thu Aug 25, 2016 12:36 am    Post subject: Reply with quote

I had a similar problem some years ago and ended up editing the file ~/.cups/lpoptions to force CUPS to use the printer I wanted to be the default, although you should be able to do it using the lpoptions command instead, as shown below. You can see below that I started with my Canon PIXMA MP560 printer as the default, and changed the default to be the CUPS PDF virtual printer.

First check which printers are defined and which is the current default:
Code:
$ lpstat -s
system default destination: Canon_MP560_Printer
device for Canon_MG6100_series: bjnp://192.168.1.200
device for Canon_MP510_Printer: smb://WORKGROUP/<username>:<password>@<machine>/Canon_MP510_Printer
device for Canon_MP560_Printer: usb://Canon/MP560%20series?serial=1653C4&interface=1
device for Canon_MP560_WiFi: lpd://192.168.1.75/lpt1
device for HP_CLJ_5550: lpd://10.90.41.101/lp1
device for Samsung_MultiXpress_C9352_01: lpd://10.90.21.10/lpt1
device for Samsung_MultiXpress_C9352_02: lpd://10.90.21.20/lpt1
device for Samsung_Xpress_C460FW: socket://10.90.21.125
device for Samsung_Xpress_C460FW_WiFi_Direct: socket://192.168.3.1
device for Virtual_PDF_Printer: cups-pdf:/

Now check what are the options of the current default printer:
Code:
$ lpoptions -l
Resolution/Output Resolution: *600dpi
ColorModel/Color Model: *rgb
PageSize/Page Size: Custom.WIDTHxHEIGHT Letter Letter.bl Legal A5 *A4 A4.bl B5 4X6 4X6.bl 4X8 4X8.bl 5X7 5X7.bl 8X10 8X10.bl l l.bl 2l 2l.bl postcard postcard.bl postdbl envelop10p envelopdlp envj4p envj6p businesscard businesscard.bl wide wide.bl
MediaType/Media Type: *plain glossygold prophoto2 proplatinum semigloss glossypaper matte highres postcardaddress ijpostcard glossypost prophotopost postcard tshirt envelope otherphoto
InputSlot/Paper Source: auto *asf cassette continuous
CNExtension/Amount of Extension: 0 1 *2 3
Duplex/Automatic Duplex Printing: None *DuplexNoTumble DuplexTumble

Now set the CUPS PDF virtual printer as the default printer (the 'lpstat -s' command gave the printer name to use):
Code:
$ lpoptions -d Virtual_PDF_Printer
copies=1 device-uri=cups-pdf:/ finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='Virtual PDF Printer' printer-is-accepting-jobs=true printer-is-shared=false printer-location='Clevo W230SS' printer-make-and-model='Generic CUPS-PDF Printer' printer-state=3 printer-state-change-time=1471915967 printer-state-reasons=none printer-type=10547276 printer-uri-supported=ipp://localhost/printers/Virtual_PDF_Printer

Now check what are the options of the current default printer:
Code:
$ lpoptions -l
PageSize/Page Size: Custom.WIDTHxHEIGHT 11x14 11x17 13x19 16x20 16x24 2A 4A 8x10 8x12 A0 A1 A2 A3 *A4 A5 AnsiA AnsiB AnsiC AnsiD AnsiE ArchA ArchB ArchC ArchD ArchE C0 C1 C2 C3 C4 C5 Env10 EnvC5 EnvDL EnvMonarch Executive ISOB0 ISOB1 ISOB2 ISOB3 ISOB4 ISOB5 JISB0 JISB1 JISB2 JISB3 JISB4 JISB5 Ledger Legal Letter RA0 RA1 RA2 RA3 RA4 SRA0 SRA1 SRA2 SRA3 SRA4 SuperA SuperB TabloidExtra Tabloid
Resolution/Output Resolution: 150dpi *300dpi 600dpi 1200dpi 2400dpi


See http://localhost:631/help/man-lpoptions.html
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 896
Location: US-FL-EST

PostPosted: Thu Aug 25, 2016 5:48 am    Post subject: Reply with quote

Fitzcarraldo wrote:
... you should be able to do it using the lpoptions command instead, as shown below.

...

See http://localhost:631/help/man-lpoptions.html

Thanks for the tip. It's been sooooo long since I've played with lpadmin, lpstat and lpoptions. ;)

I've already checked a few things through the eyes of lpd and I expect this approach to prove fruitful. One of the funny things right off is that while I can select and print to the virtual PDF printer in all printer dialogs, lpstat -s doesn't list it.

This give me a good starting point but it will probably take me several days before I get things set to my satisfaction.

Thanks!
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 896
Location: US-FL-EST

PostPosted: Fri Aug 26, 2016 3:01 am    Post subject: Resolution Reply with quote

Even though my newly 'enlightened' understanding has successfully resolved my issues, I'm pretty sure parts of what I think I now understand could easily be wrong. I also know I could have deep gaps in said putative understanding.

Be that as it may be, in my self-assured ignorance, I'll explain both where my previous assumptions came from (in case anyone else suffers from the same delusions) and what resolution came from enlightenment.

I have had for a long time the standard default of the day installation of CUPS. I have also always had the 'cups-pdf' package installed as part of my total print environment.

One assumption I made was to think that the 'print to pdf' option I saw in various printer dialogs had something to do with the Virtual PDF Printer. In point of fact, that message does not have any direct connection with the Virtual PDF Printer. For many packages such as browsers, office suites and some graphics programs, printing to a PDF file is seems to be a natively supported function. As a matter of course, putting that support in their respective printer dialogs just naturally follows.

My understand now of how this works is that if the Virtual PDF Printer is there, then the above packages will use the available Virtual PDF Printer. If not, then these packages will convienently use their internal support for printing to PDF documents without fuss, muss or user bother.

Moreover, if you don't have a default printer of any kind, then they'll use an internal set of fallback defaults for page size, color, greyscale et al. Otherwise these package internal PDF printing functions will use your default printer for setting printer parameters.

Because I had the CUPS-PDF package installed and I was able to print to PDF files, I assumed I had the Virtual PDF Printer up and running.

If you want an actual Virtual PDF Printer, you need to create a Virtual PDF Printer through either the CUPS ore KDE settings "add printer' dialog. The following paragraph from the official CUPS-PDF Documentation page contains all the relevavent info and clues:
Quote:
Now you will be able to choose "CUPS-PDF (Virtual PDF Printer)" when setting up a new printer in CUPS (a CUPS-restart may be necessary).
To set up a queue for other UNIX clients you should select Postscript as vendor and the Color Printer as model for your new printer; queues that get their input from samba or netatalk (i.e. Windows, OS/2 or MacOS) can be set up as raw queues. On the Windows, OS/2 or MacOS system choose a color postscript driver for that network printer (the drivers for Minolta Page Works or HP DesignJet printers do a good job).
Hint: If you want to create grayscale PDFs you just have to choose a grayscale printer driver, i.e. the postscript.ppd that comes with CUPS on the Linux side or a b/w laser printer (e.g. a HP LaserJet) on the Windows side. On the Linux side be aware that the postscript.ppd will not re-process data that is already supplied in Postscript format, i.e. a color Postscript will keep its colors.

In other words, if you need to regularly print to PDF files, you should create an explicit Virtual PDF printer where you can directly control the printer parameter settings. Don't rely on internal 'print to PDF' functions supported by various meta packages.

Please excuse any remaing typos, I was really tired when I wrote this. ;)

Special thanks to both Fitzcarraldo and Section_8. Both the reminder to use the various 'lpd' support tools and the reminder to look more closely at CUPS_PDF helped me get past this.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum