Apache OpenOffice (AOO) Bugzilla – Issue 6829
PDF is not generated in 1.0.1
Last modified: 2003-03-13 10:24:42 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!
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.
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.
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)
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.
.
Created attachment 3578 [details] You talk about this, don't you ?
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.
Could you please be more precise what exactly did not work for you ? Comments about sliced bread won't help the issue much.
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?
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.
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.
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.
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
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 ?
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.
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.
Just tried the RedHat 8.0 version myself, alas it worked out of the box for me. Something else must be happening here.
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?
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 ?
On the command line? Great! What now?
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.
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.
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!
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.
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.