Closed Bug 258153 Opened 20 years ago Closed 20 years ago

Print (postscript not xprint) results in: "There was a problem printing. No printer could be found"

Categories

(Core :: Printing: Output, defect)

Sun
SunOS
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: Marc.Waeckerlin, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.2) Gecko/20040903
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.2) Gecko/20040903

Whenever I try to print, I get the message Print (not xprint) results in: "There
was a problem printing. No printer could be found".

I compiled mozilla 1.7.2 with the following options:

./configure  --prefix=/home/public/freeware --enable-default-toolkit=gtk2
--with-pthreads --enable-calendar --enable-crypto --disable-jsd
--enable-extensions --disable-tests --enable-js-ultrasparc --disable-debug
--enable-optimize --disable-dtd-debug --disable-logging --enable-strip
--enable-xterm-updates --enable-ctl --disable-ldap --enable-postscript
--disable-xprint --with-system-png && gmake clean all install

Note: I cannot use xprint, I must use postscript.

Reproducible: Always
Steps to Reproduce:
1. start mozille
2. go to any page
3. "File" - "Print..." or press ctrl-p

Actual Results:  
Dialog shows:

"There was a problem printing. No printer could be found"

Expected Results:  
Printing dialog opens.

I had no problems with previous releases (1.4 or 1.5 was the last before the
update to 1.7.2), except that I always have to configure without xprint, because
xprint is and will not be supported by our admins.
This is still present in 1.7.3.  Results are identical.  My configure options:

--disable-debug --disable-shared --enable-static --enable-optimize
--enable-calendar --enable-extensions --enable-js-ultrasparc --disable-xprint
--enable-postscript --enable-xinerama --disable-tests --enable-ldap
--enable-crypto --disable-pedantic --disable-freetype

I maintain a shared Mozilla installation used by a few thousand folks, and
cannot use Xprint in our environment.  I saw something on an email list that
stated that postscript printing support had actually been removed.  I sure hope
that's not true, because it will make Mozilla unusable in our environment.
There are no plans to remove postscript printing.  It is in fact the preferred
prining system, by pretty much everybody except the XPrint code's maintainer,
who is however probably the noisiest person about saying which printing system
is preferred.
(However, the XPrint code's maintainer is one of the few people who contributes
Solaris builds, and the builds he contributes all have Postscript disabled.)
Okay, that's reassuring -- and Sebastien, if you're watching, please excuse my
email outburst.  It's been a long couple weeks.  I apologize.  :)

With that said, then, there's definitely something wrong, because my own custom
builds (--disable-xprint --enable-postscript) have this problem of "No printer
could be found" before it even gets to the Print... dialog.

I'm currently running a build that enables both Xprint and postscript, and we'll
see what happens with that in the morning.  Too bad my build box is such a dog.
When the xprint module isn't compiled in, the "no printer could be found" error
code is returned from GlobalPrinters::InitializeGlobalPrinters() when the
printer list is empty, after going through the normal steps to build the printer
list. However, when the PS module is compiled in and not disabled at runtime,
there should always be at least one printer added to the list.

One explanation would be if the PS module had been disabled at runtime. Hal or
Marc, could you check for two things?

1) An environment variable MOZILLA_POSTSCRIPT_ENABLED set to "false" or a string
beginning with zero?

2) A preference "print.postscript.enabled" set to false? For this, open the URL
<about:config>.

If neither of these is the case, could you supply some more information:

1) Do you set the environment variable MOZILLA_POSTSCRIPT_PRINTER_LIST? If so,
what to?

2) Do you set the preference "print.printer_list"? What to?

3) Do you have the CUPS printing software installed on these systems?
Specifically, do you have the shared library "libcups.so.2"? Do you actually
have CUPS configured with printers?

4) What compiler are you using?  gcc or sun's cc?
> 2) A preference "print.postscript.enabled" set to false? For this, open the 
> URL <about:config>. 
 
That's it, now it works! 
 
Who in the hell set this variable to "false"?!? It wasn't me! 
 
Before I added the compile options to disable xprint and enable postscript, I 
compiled with default settings, that enabled xprint only. Unfortunately just 
to find out that a) printing does not work and b) setting up xprint was 
impossible. 
 
Could it be that the xprint code in mozilla disables the postscript printing 
and sets the above variable to "false"? If so, please remove that nasty code! 
 
 
>------- Additional Comments From dbaron@dbaron.org  2004-09-15 21:06 PDT 
------- 
>(However, the XPrint code's maintainer is one of the few people who 
contributes 
>Solaris builds, and the builds he contributes all have Postscript disabled.) 
 
That's the (only) reason why I have to compile myself on Solaris. 
Hey, check it out!  It looks like Roland's builds might *not* have postscript
disabled!  Once I fixed that preference setting (which was also set for me, and
which I also hadn't set), the Print dialog started working on Roland's 1.7
build.  It even had a selection for Postscript/default.

I'll be darned.  With that, I can stop building it myself.  Off to check his
1.7.3 build...

Well, this line is commented out in modules/libpref/src/init/all.js:

// pref("print.postscript.enabled",      true);

Grepping through both the source code and the official build, I can't find any
other references.  Do non-initialized preferences default to false?
Roland isn't the only one contributing solaris packages to mozilla.org; there's
usually a build contributed by a Sun employee as well. These builds aren't
missing the PS module.

I haven't been able to find anything which creates a print.postscript.enabled
preference, other than that commented-out line in all.js. Hal or Marc, 
is it possible you have another copy of mozilla installed somewhere? A package
from blastware or sunfreeware, perhaps? Perhaps someone else is distributing a
copy with that pref set to false by default.

Could you try to repeat this with a fresh profile? The test would be as follows:

1) Start mozilla with -ProfileManager
2) When the profile manager dialog opens, create a fresh profile and start
mozilla with it.
3) Try to print. See whether you get this error about no printers.
4) Exit mozilla.
5) Go into .mozilla/<name-of-profile>/<random-dir>.slt and examine the prefs.js
file there to see if it contains this pref.
Huh.  I tried your process, and there's no reference to any postscript
preferences in prefs.js.  (And, of course, printing works.)  (Using the Sun
1.7.3 build.)

I've kept the same profile over several different versions, so I suppose it's
possible some previous version changed the setting.

I'm baffled, but since I can't reproduce it, I officially have no leg on which
to stand.  I suppose I'll just modify our wrapper to automatically fix users'
profiles with the proper setting, in case theirs has been misset as well.

Thanks for the fix!
Might as well resolve this.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.