04-22-2008, 11:28 PM | #1 |
Connoisseur
Posts: 54
Karma: 399
Join Date: Sep 2007
Device: iLiad v2
|
Too slow to open PDFs? A solution!
If you find some PDFs are too slow to operate on your iLiad, i.e., more than 5 seconds to turn a page, you are very likely having a poorly generated PDF with Type3 font.
Type3 fonts are bitmap fonts, and the iPDF software on your iLiad doesn't handle them very well (a problem with the poppler library it uses). One evidence is that they open fine and very quickly in Acrobat Reader on your PC. To test if a PDF is using such bitmap fonts, open them in Acrobat Reader and check the embedded font list, or zoom in to 1000% and see if the characters have rough edges. Type1 fonts or TTF fonts should have very smooth edges. If you are indeed having such PDFs, there is a way to fix them by replacing Type3 fonts with their Type1 counterparts. (The following is for Linux folks, and if you are using Windows or Mac, you can also try it if you have Perl installed but I don't guarantee success) First, you need to obtain a PS file for the same PDF. Many tech papers offer both PS and PDF for download (e.g., from citeseer). Or you can convert PDF to PS file by pdf2ps under Linux. Second, you need to use a tool (written in Perl) called pkfix. It's able to fix the Type3 fonts in many PS file with Type1 fonts. pkfix doesn't work on all PS files, and if it fails, there is also a tool called pkfix-helper (on the same page) that is able to figure out which are the matching Type1 fonts by comparing font matrix. You may use the pkfix-helper first, and then pkfix. The last step is simply to convert PS back to PDF. You may do this using ps2pdf under Linux. |
04-23-2008, 07:46 PM | #2 |
Addict
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
|
Thanks for the info. My Linux PDF printer used to create PDFs with Type3 fonts, and now I know why it takes forever to load them on the iLiad...
|
Advert | |
|
04-25-2008, 10:04 AM | #3 |
Pac-Man caught my iLiad.
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
|
Thx for the link to pkfix, alanine.
This can be helpful when I get intouch with created-by-dvips ps files. |
09-25-2008, 10:22 AM | #4 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Thanks! I don't know how I missed this post earlier. This should help a lot.
Is there a way to batch-check PDF files to see if they've used Type 3 fonts? It would be nice to process them all before loading them onto the iLiad and experiencing the slowdown. |
09-25-2008, 10:30 AM | #5 | |
Addict
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
|
Quote:
Code:
$ pdffonts print.pdf name type emb sub uni object ID ------------------------------------ ----------------- --- --- --- --------- [none] Type 3 yes no yes 87 0 [none] Type 3 yes no yes 183 0 [none] Type 3 yes no yes 42 0 [none] Type 3 yes no yes 33 0 |
|
Advert | |
|
09-25-2008, 10:38 AM | #6 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Cool. I have Ubuntu here at work (I gave away the Ubuntu machine at home to someone who didn't have a computer, and that's a nightmare story of its own.) I'll try that.
|
09-26-2008, 03:15 AM | #7 |
Connoisseur
Posts: 68
Karma: 855
Join Date: Jan 2007
Location: Netherlands
Device: iLiad
|
I think the following bash script could be used to batch-check pdf files:
Code:
#!/bin/bash for i in $*; do c=`pdffonts $i | grep -c "Type 3" ` if [ $c -ne 0 ]; then echo $i fi done Code:
check.sh *.pdf Note: I haven't tested this yet. |
09-26-2008, 05:17 AM | #8 |
Addict
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
|
The script works fine, but only if you don't have white spaces in your filenames. I've made some small changes, and now it works:
Code:
#!/bin/bash for i in "$@"; do c=`pdffonts "$i" | grep -c "Type 3" ` if [ $c -ne 0 ]; then echo $i fi done Code:
$ check.sh *.pdf |
09-26-2008, 10:08 AM | #9 |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Great, thanks! I brought my iLiad to work (where my linux machine is) and I may be able to try this later today.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Confused by behavior of two pdfs w/permissions passwords, but no open passwords/DRM | grr | 0 | 12-21-2009 02:21 PM | |
calibre - very slow conversion, very slow on PRS | cremofix | Calibre | 3 | 06-10-2009 04:21 PM |
Iliad won't open some PDFs | sputnik | iRex | 1 | 07-15-2008 08:38 PM |
too slow to read pdfs with many pages? | alanine | iRex | 4 | 10-12-2007 06:41 PM |
TOO SLOW to open "Table of Contents" | mdhuang | Sony Reader | 16 | 09-06-2007 10:29 PM |