# spadmin gone from libreoffice



## free-and-bsd (Jan 25, 2015)

Hello everyone,

I've noticed right now that spadmin has been dropped from editors/libreoffice upstream. Thankfully I still have my printers I configured when it was there, so they work. Still, I don't see any dialogs to add printer. How is it done now, does anybody know?

I've just sent an email to the author of this initiative, but does anyone have any ideas or solutions for this?


----------



## wblock@ (Jan 25, 2015)

The whole comment appears to be "drop spadmin".  No reference, no explanation, no alternate.  I did find this: https://wiki.documentfoundation.org/ReleaseNotes/4.3#CUPS.2C_fax_machines_and_spadmin


----------



## free-and-bsd (Jan 25, 2015)

Yes, I've seen this as well. Not very helpful... They'll get some of us to become programmers to implement some simple solution, I think.


----------



## free-and-bsd (Nov 8, 2015)

wblock@ said:


> The whole comment appears to be "drop spadmin".  No reference, no explanation, no alternate.  I did find this: https://wiki.documentfoundation.org/ReleaseNotes/4.3#CUPS.2C_fax_machines_and_spadmin


Well, it seems things aren't just as bad as they may seem... Looks like you don't need spadmin any more. In ~/.config/libreoffice/4/user/psprint dir there is a file psprint.conf, which includes the following printer settings:

```
...
[Generic Printer]
Printer=SGENPRT/Generic Printer
DefaultPrinter=0
Location=
Comment=
Command=lpr -Plp
QuickCommand=
Features=
Copies=1
Orientation=Portrait
PSLevel=2
PDFDevice=-1
ColorDevice=0
ColorDepth=24
MarginAdjust=-1,-1,-1,-1
PPD_PageSize=A4
PerformFontSubstitution=false
SubstFont_Cumberland=Courier
SubstFont_Thorndale=Times
SubstFont_Times New Roman=Times
SubstFont_Arial=Helvetica
SubstFont_Timmons=Times
SubstFont_Courier New=Courier
SubstFont_Albany=Helvetica
SubstFont_Helmet=Helvetica
...
```
Especially interesting to us LPD users is the line *"Command=lpr -Plp"*. This was set back when spadmin still existed, but I wonder if the same  user config isn't found in a new user installation.

For example, I'm now running 11.0-CURRENT with a brand new installation of all needed ports (on a separate ZFS dataset), but my home dir is shared among different installations. And printing to LPD from LibreOffice works just as fine there, as it does in the old one.

Hope this _is_ good news


----------



## free-and-bsd (Nov 10, 2015)

OK, for further reference and to get things united in one place:

after the installation of recent enough editors/libreoffice one ends up with that one file called /usr/local/lib/libreoffice/share/psprint/psprint.conf among the installed documentation. It just has some changeable settings (most important ones, I guess), among them there is *Command=*... setting, also *QuickCommand=...* for the instant printing button to print without dialogue.

The file then can be copied over to one's home directory into .config/libreoffice/4/user/psprint and then be edited to suit one's needs. I've checked this trick on a new user created for this particular purposes. It contains the default [Generic Printer] section, which can be copy-pasted into a [Custom Printer] section in the same file to contain some different printer settings.

Another printing related thing libreoffice has is the file /usr/local/lib/libreoffice/share/psprint/driver/SGENPRT.PS , which is nothing else but a "generic" PPD file. Looks like it handles the printer-independent part of the PS-formatted output to be sent to a PS-compatible printer. This PPD file, I guess, is used by libreoffice's GUI-based printing dialogue when configuring printing options: duplex, number of pages, collate etc. Isn't this why it needs be linked against cups libs? I'll check that Yes, it is.

It is our part then to write a simple enough filter to redirect the output to the printer device itself. For example, one may want to print to a samba-shared printer.


----------

