[Gambas-user] Printer not found

Doriano Blengino doriano.blengino at ...1909...
Tue Apr 7 08:27:54 CEST 2009


CelticBhoy ha scritto:
> I have writen a small stock prog, and want to print various reports, but when
> I use the printer.begin function it does not see my printer. The printer
> works fine in any other app I try to print from. I am using Ubuntu with
> Gnome and have the gb, gb.db, gb.db.form, gb.form, gb.qt, and gb.qt.ext
> modules loaded. Why wont my app find my printer ????
>
> ps. if I print to file it works fine.
>   
It happened to me too, on a machine running the latest K-Ubuntu (don't 
remember the version, I don't use Ubuntu).
There was no way to see installed printers from gambas, but every other 
program worked perfectly.
I used the strace(1) utility to see what was happening, and discovered 
that gambas was reading a file in /etc, perhaps printcap, or similar, 
where there was no mention of installed printers. The printers was 
instead reported in another file. I renamed printcaps, or deleted it, 
and all went well: gambas started to read the correct file, probably 
because it was finding no more the erroneous one.

I am sorry about not remembering things - it is not my machine. You can 
go in /etc and see which file contains the names of installed printers, 
and check that gambas reads that file. Moreover that machine was a 
Kubuntu one, not using Gnome; so things can be even more different.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list