Very poor pdf reading performance
I make presentations using LaTeX Beamer. Thanks to xrandr, I should be able to show them on the overhead projector using my Linux laptop. However, pages with lots of small objects (exported from CorelDraw on Windows to eps —and I have no choice regarding CorelDraw, then converted to pdf and included into the presentation within tikzpicture or includegraphics) need a very long time to load. I tried different pdf readers, and for all of them, the CPU jumps to 100% and the program need to long to display the page, if it displays it at all. I tried the same presentation on OS X and Windows XP and there is no problem there, I even tried acrobat reader on Linux but it does not perform better than, e.g., xpf and epdfview.
Is there a reason/solution? Apart from re-exporting to png with a transparent background? |
I recommend to try okular.
I don't use kde, but it's well worth to install kdelibs just for this application. Performance-wise speaking, it's far far ahead of epdfview, from my experience anyway. |
One solution might be convert it to djvu. I usually have to do that for large pdfs with lots of images because it's just too slow. I believe I put a post on here on how to do that using djvudigital. That's the only way I know for most cases.
|
Could you explain this process more:
"then converted to pdf and included into the presentation within tikzpicture or includegraphics" Includegraphics I understand, but I haven't heard of tikzpicture. If you are starting with eps graphics, why convert them to pdfs? Could the problem be that the objects are large and scaling down them down (in includegraphics) is taking time? You might try scaling them with "convert" and then include the smaller versions. |
I've also noticed that performance depends a lot on the software that is used to generate the pdf or eps. If you can export to dvi it would be better, then use 'dvipdf' to convert to pdf. Or just use different software to export it.
|
Thank you all, I will try okular and report back. I already "convert" the images and they are 1:1 scale in the presentation. The Beamer class only generates pdf as far as I know, and pdflatex does not know about eps. TiKZ is from the same author and I use it to create small animations or as a replacement to overpic. I am a physical chemist. I generate the presentations with XepdfLaTeX.
djvu might be a solution, I will look for your post and see whether it suits me. |
Okular does not cut it either. I am desperate enough to have tried SumatraPDF into wine (at least, it is open source) and it kind of works better than anything native :'(
But when it needs a bit of time to render a pages, it switches to a white background asking to "please wait". I guess I will go on trying the windows side of things. How unfortunate! Okular is faster than the other linux-viewers, though. But not quiet fast enough for a presentation. EDIT: And foxit reader, although not free, is the best performer natively on Linux, BUT there are rendering glitches. |
How big is the pdf file?
Maybe the bottleneck is not in the rendering (at least not entirely), do you see much disk activity while it loads? |
Quote:
I tried acroread, again, and it performs decently. Well, it needs some time to load but rendering is useably fast and without glitches. |
A pdf of that size should render ok, however it all depends on the contents I guess.
|
For example I have a pdf that I have gotten from a teacher, I've optimized it using pdfopt and it opens in 22.684s real time. The original opens in 22.724s real time. Converting it to djvu it opens in 0.740s, and has the same quality. Not to mention that the original pdf took about 22 seconds to display EACH PAGE !!! INSANE !!! This is probably the worst pdf ever made ! And it's only 9207 kB or about 9 MB. (the djvu version scrolls through pages instantly, basically less than 1 sec to display any one page, it also has a nice fullscreen mode for presentations and such ...) Also, the djvu is 6 MB.
|
Postscript is a wonderful language, but as any language, it can be abused (e.g., you can write infinite loops in post script). Improperly or inefficiently written eps files may result in an interpreter which follows all instructions to the letter to be slow, while one which has workarounds for various known quirks to be fast.
I am not aware if djvu has the hyperlinking capability which beamer presentations use. You might be better off rasterizing whatever files you have before including them in your presentation (you will move the “time hog” to creating the images rather than rendering them during a presentation). |
Quote:
|
Thank you all, I ended up rasterizing the whole presentation, which may actually be a good idea. I'll post my script here, it uses convert from imagemagick suite. The resulting file is another pdf file containing the rasterized version of every of the slides in the original file. I use png as intermediate format. Change the first convert call if there are more than 99 slides.
Code:
#!/bin/sh |
Thanks for the feedback. I am sure that this will come in handy at some point. :)
*bookmarking* |
All times are GMT -5. The time now is 06:09 AM. |