Steve Litt wrote:
Good information here Helge...

On Tuesday 10 November 2009 08:12:37 Helge Hafting wrote:
ask2 wrote:
Hi
I try out LYX maybe once a year. What I am looking for when I try it is
if the pdf files I can get is of high quality. Unfortunaltely that never
is the case.

So am I just stupid or is there a way to get really high quality pdf from
LYX?
Yes. Make sure the default font is not a bitmap font. Unfortunately, the
default font is a bitmap font. You must change it.

So, go "Document->Settings->Fonts" and choose something else instead of
"standard". There is "Latin Modern" if you like the look of the
standard font on paper, but want nice pdf. Or select something else
like Times Roman, Palatino, . . .

Helge -- I've been using Century Schoolbook, which shows up as one of the choices with LyX as it comes with Mandriva and Ubuntu. Is Century Schoolbook a vector font? I found Latin Modern too light and stringy.

I don't know. Last time I tested, only the "Default" resulted in ugly PDFs. That was a long time ago though. The test is simple enough - write with the font you want to test, and view the resulting PDF in adobe acrobat. In acrobat, zoom in as much as possible.

If the huge glyphs on your screen looks ok, then it is a good vector font. If there are "staircase effects" on anything that should be round or slanted, then you have a bitmap font.

You should use acrobat for this test. Some other PDF viewers handle bitmap fonts better, and don't get such visible problems.


To avoid making this change for every document, save it as the new default.

Main purpose is to read on the computer so both images and text should be
suitable for that.
That took care of the text, now for the images. What exactly is the
problem with your images?

If you draw something, make vector graphics rather than bitmaps, if
possible. If you need screenshots, use png. Never jpeg, jpeg is only
for photos.

I didn't know .png is a vector graphic.

No, png is not a vector format. But a PC/mac screenshot is never in vector format anyway. The point was - when you need bitmaps, use good ones. Jpeg will mess up any hard edges (such as a screenshot with text and window edges in it.) Jpeg is fine for photos - that is what jpeg was designed for. (Joint Photographic Expert Group.) Unfortunately, too many people abuse jpeg for screenshots and line drawing, mistakenly thinking it is some kind of generig graphics format. It is definitely not!

I've been converting graphics to PDF before using them -- PDF *is* a vector format after all, and it seems to scale well. However, it would be soooooo much easier to use .png. Thanks for the tip.

If your material is bitmap graphics, then png is a good choice. Note that bitmaps can be converted to PDF, but that does not make it vector graphics. This because PDF can embed bitmaps. (And so can postscript.)

If your app can save as pdf, ps, eps or svg, then chances are it makes vector graphics. And then it makes sense to keep the graphics in vector
form all the way to the printer or the reader's screen.


The problem with bitmaps is that they has limited resolution. If the reader's screen (or the printer ot be used) has higher resolution, then the bitmap has to be upscaled. Upscaling is _never_ a perfect process. It tend to introduce staircase effects on slanted lines, or possibly blurriness in an attempt to cover up the staircase effects.


There are always someone with high-end equipment that has a higher-resolution screen than you. And even the cheap printers has much higher resolution than the best screen around. You can fix this by making bitmaps with very high resolution, but then the files get enormous and cumbersome.

Vector graphics have no such problems. They are not arrays of pixels, but a set of drawing commands. [Draw a green line from location (5,5) to location (1882,9644) and so on.] Such drawing commands work with any resolution, be it a 96 dpi screen, or a 1200 dpi photosetter. The output is as good as it gets on that output device, no matter what. And the files are considerably smaller than high-resolution bitmaps too.

It is the same with fonts. A vector font consist of drawing instructions
for each letter. (A "T" is a couple of lines with a specific thickness, and so on.) A bitmap font provides a bitmap. The bitmap is ok at some resolution, and insufficient at higher resolutions. Historically, the bitmap approach was considered easier.


As far as the original poster, I've found that the output quality depends as much on the PDF reader as anything else. I've had docs that were beautiful on Acroread and ugly on xpdf, and others that were ugly on Acroread and beautiful on xpdf. I hate to admit it, but if my eBooks look good on Acroread, that satisfies 95% of my potential readers so I let it go that way.

Most people use acrobat indeed. Acrobat does not handle bitmap fonts too well, especially not if you magnify. This is why vector fonts are important. (xpdf has fewer problems with bitmaps.) Printing the PDF on a good printer is another. You may want to report ugliness bugs about bad xpdf results - they might get fixed. :-) (Report to whoever provides you with xpdf, not this list.)

Helge Hafting

Reply via email to