Issue 6829 - PDF is not generated in 1.0.1
Summary: PDF is not generated in 1.0.1
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: gsl
Classification: Code
Component: www (show other issues)
Version: current
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ulf.stroehler
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-07 12:40 UTC by udippel
Modified: 2003-03-13 10:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
You talk about this, don't you ? (9.30 KB, image/png)
2002-11-13 03:14 UTC, udippel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description udippel 2002-08-07 12:40:26 UTC
Sounds too strange, but here no PDF is converted to by the PDF-converter. In
1.0.0 it did do the trick. What's wrong ??
So, I create a PDF-converter (# spadmin), define the user-dir (/home/myself/pdf)
and (click the PDF Converter!! of course; and) print a Test page -> which comes
running from my LaserPrinter! I removed the default Command lpr; but still
nothing in /home/myself/pdf. And nowhere else.
And the PDF is the *big* thing here for me!
Comment 1 Unknown 2002-10-17 19:54:25 UTC
When I try to print a "hello world" text document out of OOo 1.0.1 on
Sparc Solaris 8, it comes out as post-script.  
Comment 2 purveschris 2002-10-18 14:11:07 UTC
I got the PDF Converter running last night on a Debian system.  I found that from inside 
oopadmin (same as spadmin?)when editing the properties for the PDF converter there 
were two drivers available:  "lpr" and "gs -q...".  It wasn't enough just to delete the 
"lpr" option.  I had to double-click on the "gs -q..." line to actually change the print 
output.  Once I did that everything worked well.  Note that it's not necessary to delete 
the lpr line.  Unfortunately I'm at work on a Windows machine right now, so I can't 
double-check the steps.  I will check later.
Comment 3 udippel 2002-11-06 05:27:31 UTC
Tried this, but doesn't. Strangely enough, the StarOffice Test.pdf is
being created in the correct directory, but that's it. Anything else
ends up in /dev/null.
I can't believe to be the only here, especially after I found the same
behaviour on another, fresh install of RH 8.0 (comes with OpenOffice)
Comment 4 philipp.lohmann 2002-11-12 13:41:40 UTC
An empty command line is interpreted as either "lp" or "lpr" depending
on what's installed on your system. This will result in a printed
document rather than a PDF document. You need to supply a command line
that actually does the PDF conversion, so please click on the "gs" or
"distill" command line supplied if either ghostscript or distiller is
in your path.
Comment 5 philipp.lohmann 2002-11-12 13:55:31 UTC
.
Comment 6 udippel 2002-11-13 03:14:23 UTC
Created attachment 3578 [details]
You talk about this, don't you ?
Comment 7 udippel 2002-11-13 03:18:50 UTC
Why wouldn't it work on two of my installs, if no other trick is required?
OpenOffice should not only "worksforme" but "worksfortheworld".
Of course, I can still print to .ps and the ps2pdf; but this is not
the greatest thing since sliced bread.
Comment 8 philipp.lohmann 2002-11-13 09:01:14 UTC
Could you please be more precise what exactly did not work for you ?
Comments about sliced bread won't help the issue much.
Comment 9 udippel 2002-11-14 02:06:54 UTC
Sorry, then, but that "worksforme" is not helpful either. Please find
the detailed description further up. The first post, incidentially. It
does not create PDFs. over. At least not for me. 1.0.0 somehow did,
though. Printing is fine, I tried to follow the suggestions as given
here, but everything seems to end up in /dev/null, while lpr prints
nicely (as nicely as an old Laserjet 5 can).
Just started to read the gs man pages trying to understand the command
line as given by Open Office and the parsing of data into it in order
to debug the thing by playing with it. Any hints here?
Comment 10 philipp.lohmann 2002-11-14 09:58:27 UTC
I just did the following, to try to reproduce your problem:
- did a fresh OOo 1.0.1 install
- started spadmin
- made a new PDF converter using the gs commandline that was in the
ComboBox on the 3rd page of the add printer dialogue and a
subdirectoryof my home
- started soffice
- created a sample document
- printed to the new converter
- got Untitled1.pdf in the specified directory

Perhaps we can find which step does not work on your system.

The commandline i used is

/usr/bin/gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="(OUTFILE)" -

where the parameters have the following meaning
-q: quiet operation
-dNOPAUSE: do not stop after each showpage
-sDEVICE=pdfwrite: output pdf
-sOutputFile="(OUTFILE)": write output to file (OUTFILE) which is for
each job replaced by <Jobtitle>.pdf.
-: read from stdin

To test if this command line works at all I suggest printing to a file
 (say test.ps) on the "Generic Printer", then converting the resulting
PostScript to PDF by using

cat test.ps | gs -dNOPAUSE -sOutputFile=test.pdf -sDEVICE=pdfwrite -

Perhaps there are errors in the conversion step that we yould see this
way.
Comment 11 udippel 2002-11-14 10:51:13 UTC
That was fast! Thanks.
I started from the end. The command line works like hell!
I compared the one you send; it is the same as used in the PDF-applet
here.

Some question: is spadmin supposed to be started from su or the user?

Next I'll go and try remove any printer. Where are those stored; I
didn't find them?! Maybe instead of fresh install, I could kill their
configs? Currently I don't believe in fresh install here, because it
had been a fresh install, and everything as you explained, spadmin,
and ... nothing.
Comment 12 philipp.lohmann 2002-11-14 11:06:33 UTC
spadmin is started by the user to add/change priters individually; if
you start it as root (or rather the user who did the network install
of Ooo) it should change the printers for all users (the priviliged
user needs a workstation installation in that case, too).

The printers are stored in <office>/share/psprint/psprint.conf (if you
have a single installation or are priviliged) and in
<workstation>/user/psprint/psprint.conf for a multi-user installation.

The psprint.conf files are in ini-format; you can simply cut out all
sections, i'd recommend to keep the [__Global_Printer_Defaults__]
section as well as the [Generic Printer] section.
Comment 13 udippel 2002-11-14 11:09:11 UTC
Okay, done this: all printers removed (one has to remain as default,
it seems - but I even created a dummy and passed 'default' to that to
make sure everything was removed).
Okay, re-created a new default (LaserJet 5).
Created a new PDF converter
Allocated a directory under ~ as pdf directory
Printed the test page from the printer applet
This test page shows up in the 'good' directory! (as described earlier)
Started soffice 
printed to the new converter
got nothing
Comment 14 philipp.lohmann 2002-11-14 11:15:44 UTC
This is strange; the testpage in spadmin is printed the same way as in
soffice. Let's see for other possibilities:
1. you're using the RedHat supplied Ooo, so i assume you have a
network installation and did a user installation out of that ?
2. Are there any funny access rights to the office executables
(soffice.bin, soffice shell script, both in <office>/program) like
e.g. setuid bits ?
Comment 15 udippel 2002-11-14 11:27:13 UTC
No, for the last years (StarOffice-Open Office) there was a
network-install and then a user-install. RedHat didn't ask - better :
didn't offer that possibility. Installed RH8.0 and there we were.
It should be a network-install, because everything is under /usr/lib/.
I didn't fiddle with any permissions; so far.
Comment 16 philipp.lohmann 2002-11-14 11:34:35 UTC
Perhaps (whyever) the command line of the PDF converter gets never
executed; could you try "cat - >$HOME/test.ps" as command line ?
test.ps should be created and show the contents of the document if
viewed with gs.
Comment 17 philipp.lohmann 2002-11-14 11:45:40 UTC
Just tried the RedHat 8.0 version myself, alas it worked out of the
box for me. Something else must be happening here.
Comment 18 udippel 2002-11-15 03:00:08 UTC
Okay, we're getting closer: I cannot create the testpage when spadmin
is called from the user.
In the calling terminal I get
**** Unable to open the initial device, quitting.

Next thing: I created another PDF converter with the command line that
you suggested and clicked the Test Page button. Works great.
Now I'm getting to the end of my wits, here. I can cat the Testpage,
but not gs it. From the command line I can use gs, however.
Promised: I am not aware of *any* permission changes! Eventually by a
different program?? (Which? essentially I am running RH8.0 with some
multimedia extensions that they deprived us of)

Would you have another idea?
Comment 19 philipp.lohmann 2002-11-15 08:25:26 UTC
The access rights was just a guess since i did not know at the time
what redhat might have changed to suit their installation; apparently
not much that i can see. Does gs to pdf work with the cat'ed
PostScript file  ?
Comment 20 udippel 2002-11-15 10:41:54 UTC
On the command line? Great! What now?
Comment 21 philipp.lohmann 2002-11-15 11:06:56 UTC
Essentially soffice executes ${SHELL} -c "<commandline>" to produce
the pdf file (where $SHELL is replaced by /bin/sh if SHELL is unset);
the only thing that i can think of is that something goes wrong when
executing the shell (e.g. in login scripts or whatever); this could
affect ghostcript if e.g. the shell start script sets environment
variables that ghostscript evaluates (like GS_LIB, GS_FONTPATH, ...).

But since the spadmin does the same and works, i think it unlikely
that that is the problem. Alas, I'm fresh out of ideas.
Comment 22 philipp.lohmann 2003-01-23 12:23:05 UTC
pl->us: i could not reproduce the problem; please have a look whether
you can, if not we'll have to close the bug. At least the problem in
itself should vanish with OOo 1.1 since we can export PDF directly now.
Comment 23 ulf.stroehler 2003-01-23 13:41:30 UTC
us: thanks PL for your efforts!
I also tried to reproduce this issue in OOo1.0.1 on RH8.
Everything works as designed.

/bin/sh points to /bin/bash (like on every Linux)
~/.bashrc sources global /etc/bashrc
and gs is also in the PATH (/usr/bin/gs).

Thus unless the submitter didn't do anything to ~/.bashrc, I see no
reason why printing to PDF should fail. 

But the installation of OOo1.0.1 coming with RH8.0 is of course a
network installation. Thus first of all a user is supposed to do a
workstation installation.
Execute
/usr/lib/openoffice/program/setup as a user.
When finished, execute spadmin as follows
~/OpenOffice.org1.0.1/spadmin and configure the PDF conversion Printer
as described above.
That's it!
Comment 24 michael.bemmer 2003-03-13 09:49:46 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for
details. First step in IssueZilla is unfortunately to set them to verified.
Comment 25 michael.bemmer 2003-03-13 09:53:21 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for
details. First step in IssueZilla is unfortunately to set them to verified.
Comment 26 michael.bemmer 2003-03-13 10:24:17 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details. 
Comment 27 michael.bemmer 2003-03-13 10:24:42 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.