Linux - GeneralThis 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.
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.
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?
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?
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.
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?
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.
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".
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.