Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-12-2006, 11:49 PM
|
#1
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Rep:
|
Why does Ghostscript PDF output look so bad?
I'm trying to convert some documents in KDE to PDF using kprinter. The resulting PostScript output files look just fine. When I print to PDF in kprinter, or use ps2pdf to convert the PS files, the resulting PDF can only be described as horrible -- jagged fonts, rough lines, some text completely missing. Look here for an example of what I am talking about (the top is the PS and the bottom is the resulting PDF). How can I change this?
|
|
|
06-14-2006, 08:39 PM
|
#2
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
Anyone else experience this?
|
|
|
06-16-2006, 08:12 PM
|
#3
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
I guess no one has ever had this problem before. Well thanks for the help. So much for the great "open source community" everyone talks about.
|
|
|
06-17-2006, 05:41 PM
|
#4
|
Member
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548
Rep:
|
Perhaps if you told us a little more ... such as whatr sort of printer you are using, how it is connected to (what sort of) computer, and what sort of distro/kernel/version you are using ... we might be able to help.
Your rather unhelpful third comment(post) does nothing to endear you to the community (or any sort of community, for thast matter).
I have been monitoring this tread to see if anyone else has had a similar problem -- luckily I have no such problems -- but my impression of your output is similar to a badly created OCR output. But then what do I know?
|
|
|
06-18-2006, 08:25 PM
|
#5
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
Quote:
Originally Posted by minrich
Perhaps if you told us a little more ... such as whatr sort of printer you are using, how it is connected to (what sort of) computer, and what sort of distro/kernel/version you are using ... we might be able to help.
|
I am not using a printer. I am trying to create a PDF by printing to a file using the kprinter program. I am using Slackware 10.2 with kernel 2.4.31.
Quote:
Originally Posted by minrich
Your rather unhelpful third comment(post) does nothing to endear you to the community (or any sort of community, for thast matter).
|
Maybe you're right, but that's the way I feel. Everyone always says "With Linux, there is no one company but the community will definitely help with your problems." After doing my homework to make it easier on any would-be answerers (reading man pages, searching Google for hours, looking at newsgroups, etc.) and no one even bothers to say so much as "Sorry man, I don't know the answer" or "I had a similar problem, this is what I did", it makes me wonder what the point is when everyone jumps to help the person who does no reading of his own and says "Linux sux, I'm going back to MS."
Quote:
Originally Posted by minrich
I have been monitoring this tread to see if anyone else has had a similar problem -- luckily I have no such problems -- but my impression of your output is similar to a badly created OCR output. But then what do I know?
|
Probably a lot more than I do. I'm just trying to make PDF files without having to use OpenOffice.
By the way, thanks for replying.
|
|
|
06-18-2006, 09:36 PM
|
#6
|
Member
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548
Rep:
|
Does a kprinter command come up with an option (like mine does on kde 3.5.1 on Suse 10.1 x86_64) such as 'Print to file (PDF)' -- mine has a little Adobe icon before it?
Or does your kprinter offer you a different pdf creater?
Incidentally what version of kde are you using?
Cheers
|
|
|
06-20-2006, 12:25 AM
|
#7
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
No, it has the Print to PDF, but it looks just as horrible because it uses Ghostscript to make the PDFs. At least with the Print to PS option it looks decent, but I want to have a PDF as the final result (because no one in the Windows world can read PS files). I'm using KDE 3.4.2.
I've tried messing around with the filters and print driver settings and stuff, but with no results.
Last edited by Wynd; 06-20-2006 at 12:26 AM.
|
|
|
06-20-2006, 08:05 AM
|
#8
|
Member
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189
Rep:
|
Just updated this laptop to Slackware-current [cups & related printing packages utilized] and can't duplicate your results/problem.
As mentioned in another post, with -current files, print to pdf is preceded by the adobe red icon.
My test was with a .txt file, output to default print.pdf file, open the print.pdf in Konqueror and it looked fine.
|
|
|
06-21-2006, 07:37 PM
|
#9
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
I am running 10.2. I will try updating to -current.
|
|
|
06-21-2006, 07:49 PM
|
#10
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I do something similar at work. I create a catalog of DVD backups and use an ls | sed | enscript pipe chain to produce a ps document, and then ps2pdf to produce a pdf file that windows users can read on the server. I haven't noticed such jaggies doing it this way. It is usually more likely if you print to pdf instead which will bitmap the fonts before printing.
Could the problem have something to do with your fonts? Are nonscalable, bitmapped fonts being selected somewhere along the line instead of proportional fonts?
You might try looking for ghostscript documentation on you system at '/usr/share/ghostscript/<version>/doc/', where <version> is your ghostscript version, such as "8.15".
Last edited by jschiwal; 06-21-2006 at 08:34 PM.
|
|
|
06-23-2006, 07:07 PM
|
#11
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
jschiwal, thanks for the reply. I'm not on that machine at the moment, so I will try after the weekend.
From what I can discern from Google, bitmapped fonts are the problem. Unfortunately, I have no idea how to change it.
Do you think you could post your ls | sed | enscript for me to test and see if that works OK?
|
|
|
06-23-2006, 11:33 PM
|
#12
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,931
|
You probably need to take some of those PDF files and view them .. upon separate machines (e.g. using Windows), and also with separate software under Linux. In other words, just as many different reader-environments as you can.
PDFs can be built a number of different ways; font-handling, types of fonts, and so-on have a number of different options, and it really isn't always the case that exactly what the creator "printed" will be exactly what you see. So, before you pass judgement as to whether the problem is on "recording" or "playback," establish as many test-cases as you possibly can.
Even in the Adobe suite there are PDF-generators that are "fast" and others that are "good." The readers are more consistent but even then you can see sometimes-noticeable differences between, say, a Mac and a PC.
|
|
|
06-25-2006, 04:39 AM
|
#13
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I'm on vacation this week, so I don't have access to the script.
What I did was take the output of "ls -l" with certain options for way that the date was displayed, and used cut to retain just the information I wanted. I piped this though the "tr" command to replace multiple spaces with a single tab and redirected this to a file. It is similar to a csv file but I called it <disk name>.tsv.
Then in a separate program I cat all of the individual .tsv files together and pipe that through sort and uniq to obtain a master catalog file.
Then wrote a script that used enscript to convert this file to a two column catalog.
It took a lot of tweeking so that the result looked OK, and the output of enscript will depend on things like the length of the filenames. You may need to use a single column. I also used the fancy-headers option.
The last line in the script used ps2pdf to convert the postscript file to pdf.
I printed out the man-pages for the cut and enscript commands, so I could refer to them as I tweeked the scripts. Each script was only a few lines long.
man -t enscript | lpr
man -t cut | lpr
|
|
|
06-27-2006, 12:57 AM
|
#14
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
OK, I updated to current. Now, when I try to print PDF files, I get this error message:
Quote:
A print error occurred. Error message received from system:
gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{/home/wynd/print.pdf} -sPAPERSIZE=a4 -c .setpdfwrite -f '/tmp/kde-wyndHeAFnB/kdeprint_GzkFfVy1' : execution failed with message:
Error: /invalidfon in findfon Operand stack: BitstreamVeraSansMono-Oblique-Uni-00 --nostringval-- --nostringval-- BitstreamVeraSansMono-Oblique B tstreamVeraSansMono-Oblique Font BitstreamVeraSansMono-Oblique 1232609 BitstreamVeraSansMono-Oblique --nostringval-- BitstreamVeraSansMono-Oblique Helvetica-Oblique NimbusSanL-ReguItal Times-Italic NimbusRomNo9L-ReguItal Execution stac : %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --n stringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- 5 3 %oparray_pop 6 3 %oparr y_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 9 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue Dictionary stack: --dict:1124/1686(ro)(G)-- --dict:0/20(G)-- --dict:166/200(L)-- --dict:17/17(ro)(G)-- --dict:1124/1 86(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 9212 GPL Ghostscript 8.5 : Unrecoverable error, exit code 1
|
|
|
|
06-29-2006, 12:13 AM
|
#15
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Original Poster
Rep:
|
To add another twist, now that I updated to -current, I can't make PS files either -- they come out completely blank.
Is Ghostscript really supposed to be this difficult to work with?
|
|
|
All times are GMT -5. The time now is 09:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|