DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
Fsck Surgeon
 
Join Date: Apr 2008
Location: NYC
Posts: 664
Default SOLVED: Printing with cups can't do docx files

EDIT: This is solved with Onauk's solution of using libreoffice -p to print docx and the like.


I have a small OpenBSD vm on FreeBSD, using bhyve. I installed cups, foomatic-db and whatever they pulled in. I set up cups with
Code:
lpadmin -p BrotherMFC -E -v ipp://192.168.1.50/ipp/print -m everywhere
which worked as far as printing /usr/local/share/cups/data/default-testpage.pdf. (I can also print pdfs with netcat, though.)
I then tried lp myfile.docx, however it just printed out a sheet with the line
Code:
Unsuportted XFSata: 2000
This isn't only on OpenBSD. I set up a few vms to test how the printer and scanner worked, and I get the same thing on each, including FreeBSD and various LInux VMs. The VMs don't have GUIs. I have a LinuxMint install on a laptop and that, if I open the docx in libreoffice, will print without a problem. I've been start-paging (a google replacement) but not having any luck, just finding people's success at printing PDFs, which I can do.

This isn't really important, it's more for my curiosity. If I really needed to print a docx, I can use that Linux Mint install, but I'm wondering if it's just that ipp anywhere driver can't do docx.

If anyone has suggestions, I'd be grateful. If not, I'll survive.

Thanks--and happy new year all, I don't think I said it here.

The printer is a Brother MFC-L3780CDW and has pcl emulation. I didn't see postscript emulation in the specs. If anyone needs to look, it's at https://www.brother-usa.com/products/mfcl3780cdw

Last edited by scottro; 24th January 2024 at 08:27 PM.
Reply With Quote
  #2   (View Single Post)  
Old 22nd January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 76
Default

Hello,

You can always use libreoffice directly to print with either `-p` or `--pt {Printername}` or even use `--convert-to pdf {YourFile}` and then use lp.
Reply With Quote
  #3   (View Single Post)  
Old 22nd January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
Fsck Surgeon
 
Join Date: Apr 2008
Location: NYC
Posts: 664
Default

Hi, thanks. Actually this VM doesn't have libreoffice. I can of course, convert the docx to pdf though (using my main workstation which has libre office), I'm just curious why it won't print the docx. But actually, you gave me a good idea, as I hadn't thought of the libreoffice --convert if I had a real need to print a docx and didn't have time to play around. Actually, libreoffice -p is good too. I could, without problem, put libreoffice on the VM. So, a big thanks.
Reply With Quote
  #4   (View Single Post)  
Old 22nd January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 76
Default

Ah sorry, I didn't understand that you did not have libreoffice already.

By looking some more at libreoffice printing documentation I found this page :

https://flywire.github.io/lo-p/41-Printing.html

On section 1.1 they have a small code block in Java to find what doc types your printer can understand, and more importantly they have a note in section 1.2 which reads (emphasis mine):

Quote:
It's very likely that the printers listed by this search can also output PDF, Word, PowerPoint and other file formats printable from Office, since Office delivers pages to a printer rendered as images.
So my guess is that by using lp on your docx file you sent it directly to your printer which does not understands docx files but it understands images which is what gets sent to your printer when you print through libreoffice.

Knowing the difficulty of rendering docx files correctly* I don't think any printer has support for direct docx printing.

[*] Only MS Office can do this mostly because only they know how the file format works while pretending it is open source.
Reply With Quote
  #5   (View Single Post)  
Old 22nd January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
Fsck Surgeon
 
Join Date: Apr 2008
Location: NYC
Posts: 664
Default

Ahh, ok, that helps me understand it a bit. I do know that if say, you open a docx in office and click print, it will generally print. But what you posted makes it sound like it gets converted to an image first. So, If I open word doc in libreoffice, and click print, libreoffice actually changes it to a pdf or other image first.
Thanks, this helps me understand what's going on with it.
Reply With Quote
  #6   (View Single Post)  
Old 23rd January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 76
Default

Quote:
Originally Posted by scottro View Post
But what you posted makes it sound like it gets converted to an image first.
Yes, this is what I understood from the documentation.
Reply With Quote
  #7   (View Single Post)  
Old 23rd January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
Fsck Surgeon
 
Join Date: Apr 2008
Location: NYC
Posts: 664
Default

Thanks for clearing that up. I wasn't sure. Oh,if anyone is interested, the Brother MFC-L3780CDW works quite well as a scanner or printer with OpenBSD. (for scanning, just do pkg_add dbus, avahi, and sane-backends. Then
Code:
rcctl enable messagebus avahi_daemon 
rcctl start messagebus avahi_daeman
And it finds the scanner, no muss, no fuss.
Reply With Quote
  #8   (View Single Post)  
Old 24th January 2024
Onauk's Avatar
Onauk Onauk is offline
Real Name: Thomas
Fdisk Soldier
 
Join Date: Jan 2023
Location: France
Posts: 76
Default

Quote:
Originally Posted by scottro View Post
the Brother MFC-L3780CDW works quite well as a scanner or printer with OpenBSD.
Good to know! I discovered the mopria certified products which aims to ease printing and scanning for all platforms and yours is on the list. So it sounds like mopria certification is actually working!

You can check the product list here : https://mopria.org/certified-products
Reply With Quote
  #9   (View Single Post)  
Old 24th January 2024
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
Fsck Surgeon
 
Join Date: Apr 2008
Location: NYC
Posts: 664
Default

Cool, thanks. I think I'm going to mark this solved, since it's as solved as it's going to get. I just made myself a bigger vm and though it has no GUI, I installed libreoffice so I can print various office documents.

Oh, I don't see a mark thread solved option. I guess I'll just edit the subject line. But thank you, you gave me a solution to the issue. I mentioned it to a friend who thanked me for it, as he wasn't aware of the libreoffice -p option.

Edit: I don't see a way to edit the subject either. Well, maybe I'll add line to my opening post.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing with CUPS suddenly failed acampbell OpenBSD Packages and Ports 19 18th July 2020 09:31 PM
Printing woes (cups, apsfilter) acampbell OpenBSD General 3 25th September 2015 03:42 PM
[Solved] VIM without Python feature ? sw2wolf OpenBSD Packages and Ports 3 14th May 2012 01:14 AM
[Solved] question about echo with sudo daemonfowl OpenBSD General 2 12th May 2012 06:13 PM
How to view & open DOCX files in Ubuntu/OpenOffice. unixdude Other BSD and UNIX/UNIX-like 0 11th July 2008 08:38 AM


All times are GMT. The time now is 01:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick