How to print multiple files at the same time?

I’m not sure whether this is a manjaro problem or a KDE Plasma problem. In case this is the wrong forum, I’ll head over to the KDE forums. Anyways the title says it all. I found this old post with the same question I was wondering if there was no way around using the terminal? I prefer to only use the GUI.

Why not combine the PDFs into a single PDF document, and then print that?

That might work for PDF but what about multiple word documents? (BTW that’s still tedious compared to Windows)

I am not a KDE User, but a quick boot of a KDE ISO and searching at Dolphin gave me this:

Everything you need is there?

1 Like

Do you have an HP printer by any chance?

I don’t see any service that gives me the option to print multiple word documents?

I have multiple printers where I wish for it to work but yes one of the printers is HP.

For HP, you can leverage its built-in print queue manager.

  1. First, make sure this directory exists. Create it anyways:
mkdir -p $HOME/.local/share/kio/servicemenus
  1. Then create a new file and make it executable:
touch $HOME/.local/share/kio/servicemenus/hp-print.desktop

chmod +x $HOME/.local/share/kio/servicemenus/hp-print.desktop
  1. Now edit the file (with nano or kate) and insert the following content:
nano $HOME/.local/share/kio/servicemenus/hp-print.desktop

Or…

kate $HOME/.local/share/kio/servicemenus/hp-print.desktop
[Desktop Entry]
Type=Service
MimeType=application/octet-stream;
Actions=printWithHP

[Desktop Action printWithHP]
Name=Print selected files with HP printer
Icon=/usr/share/hplip/data/images/128x128/hp_logo.png
Exec=hp-print %F

Close all instances of Dolphin, re-open Dolphin, and see if it works. (Select two or more PDFs, for example, and right-click → “Print selected files with HP printer”)

There’s a caveat: Not all file types are supported by hp-print. If any such file is not supported, HP’s GUI will notify you. For example (and sadly) ODT and DOC/DOCX documents are not supported by hp-print, and would still need to be printed via the standard CUPS route. (PDF works, as do RTF, text files, and most image formats.)


NOTE: I improvised this specifically for HP printers (the most Linux-friendly printer manufacturer). You might be able to use my template and create separate KIO services for Brother, Epson, Canon, etc, if they also have their own print tools.

No idea. I have custom action in nautilus:

You can invoke lpr the same way I invoked hp-print in my template. (With one major difference being you need to specify which printer to use.)

The only problem is, it will immediately start the print job and populate the queue. You will not be presented with a GUI to change any options, quality, which pages, number of copies, etc.

Would it take a lot for a noob to recreate that?

:point_down:

Here’s what such a template would look like:

nano $HOME/.local/share/kio/servicemenus/lpr-print.desktop

Or…

kate $HOME/.local/share/kio/servicemenus/lpr-print.desktop
[Desktop Entry]
Type=Service
MimeType=application/octet-stream;
Actions=printWithLprHP;printWithLprBrother;printWithLprEpson;
X-KDE-Submenu=Print
X-KDE-Priority=TopLevel
Icon=printer

[Desktop Action printWithLprHP]
Name=Print selected files with HP Printer
Icon=/usr/share/hplip/data/images/128x128/hp_logo.png
Exec=lpr -P Officejet_1234 %F

[Desktop Action printWithLprBrother]
Name=Print selected files with Brother printer 
Icon=/path/to/brother_icon.png
Exec=lpr -P Brother_1010 %F

[Desktop Action printWithLprEpson]
Name=Print selected files with Epson printer
Icon=/path/to/epson_icon.png
Exec=lpr -P Workforce_8888 %F

To get a list of your printer names:

lpstat -p -d

EDIT: Another caveat. The above will present the “Print” submenu when you right-click on any types of files. You can further fine-tune the “acceptable” file types. Replace application/octet-stream with a list of mime-types you approve of. (Some mime-types are in groups, which reduces clutter.)

EDIT 2: I’m not sure why, but the forum software seems to keep changing the semicolon character. This might mess things up if you copy+paste. :person_shrugging:

1 Like

Additionally to what @winnie writes about dockuments:

lowriter --pt printername document.odt

This can be a custom action then.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.