05-16-2010, 12:47 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2010
Device: JetBook Lite
|
JetBook PDF antialiasing script
One thing that bugs me about the JB is that some PDFs render in an ugly, pixellated way. So for those who have Linux, I wrote a perl script that takes a PDF, and uses ImageMagick to antialias and rescale the pages for the native size of the Jetbook's screen. This is provided AS-IS, and I'm sure other software does a better job, but hey-- some of you might find it useful.
Code:
#!/usr/bin/perl # # pdfToPpmToPdf.pl # # A perl script to convert a PDF to a series of PPM files, one per # page, then back to PDF. # # file names $inPdfFileName = "in.pdf"; $outPdfFileName = "out.pdf"; $ppmRoot = "./tmp/page"; print "converting pages to images\n"; # call pdftoppm system( "pdftoppm", "-gray", $inPdfFileName, $ppmRoot ) == 0 # and handle an error # this could be improved by checking the error codes listed in the # pdftoppm manpage or die "pdftoppm failed: $?"; print "converting each page to pdf\n"; # convert each page to a pdf @files = <./tmp/*.pgm>; foreach $file (@files) { $file =~ /(.+)\.pgm/; # get filename in front of prefix print "processing image file $file\n"; system("mogrify","-antialias","-trim","-resize", "460", $file) == 0 or die "mogrify failed: $?"; print "converting $file to $1.pdf\n"; system( "convert", $file, "$1.pdf" ) == 0 or die "convert to pdf failed: $?"; } print "concatenating pdf pages\n"; # concatenate pages with ImageMagic's convert function system("convert", "./tmp/*.pdf", "out.pdf" ) == 0 or die "concatenate pdf failed: $?"; |
05-16-2010, 01:59 AM | #2 |
Addict
Posts: 248
Karma: 1312
Join Date: Mar 2010
Device: jetbook lite
|
Um, I don't think this is a problem that only the JB has.
Me, I just stay away from pdf, period. |
Advert | |
|
05-16-2010, 08:49 AM | #3 |
Data Privateer!
Posts: 586
Karma: 62887
Join Date: Oct 2009
Location: Fargo ND
Device: Ectaco Jetbook& Jetbook Lite
|
Same here LE.
|
05-16-2010, 01:14 PM | #4 |
Wizard
Posts: 4,465
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
|
I have a number of the image type PDFs that are scanned pages from the "Backwoods
Home Magazine", they are quite readable on my JBL at 200% zoom. I have to scroll around the page, to see the image properly through the limited window that a 5-inch 640x480 display provides. I have them on the JBL for use outdoors, as more of a reference for implementing some of what is described in the articles. For an easier and smoother read I have Netbooks and PCs to read them on. ( I can also read them on my 3.5" PDA display, but that is a real chore and not worth the effort.) Image based PDFs are nice on a large display and do well for "Coffee Table" books, with high resolution color graphics, not so great on the small black&white display. Trying to force them to fit, results in a number of necessary compromises, and becomes a real chore for the little CPUs in these dedicated readers. In the case of text based PDFs with embedded graphics, (and a number of HTML based formats, as well) it can be just a matter of preprocessing the the graphic images, so that they match the ereaders display requirements. (I use the free GIMP2) That said, I agree with others here that it makes more sense to just avoid PDFs, for the small displays, whenever possible. Luck; Ken Last edited by Ken Maltby; 05-16-2010 at 01:29 PM. |
05-16-2010, 01:38 PM | #5 | |
Addict
Posts: 248
Karma: 1312
Join Date: Mar 2010
Device: jetbook lite
|
Quote:
When I first showed my brother my JBL, the first question that came out of his mouth was "does this read pdf?" And a couple days ago, someone started a thread asking about displaying the pdf he just bought/downloaded for his girlfriend. We as a community need to better educate people about the evils of pdf for the ebook reading community. It's the second worst format imaginable. |
|
Advert | |
|
05-16-2010, 04:32 PM | #6 |
Junior Member
Posts: 6
Karma: 10
Join Date: Feb 2010
Device: JetBook Lite
|
I suppose I'm a bit outside the target audience for most ebook readers. I'm not interested in buying ebooks-- I need a portable PDF reader. And for the most part, I'm quite happy with my JetBook for this purpose. :-D
|
05-16-2010, 08:55 PM | #7 |
Reader
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: Nook Color
|
I am the same type. For the most part, the JBL does a decent job.
|
05-18-2010, 07:23 PM | #8 | |
Member
Posts: 16
Karma: 10
Join Date: May 2010
Location: Southern California
Device: JetBook-Lite
|
Quote:
|
|
Tags |
antialias, jetbook, pdf, pixellated |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Script for converting ePUB to PDF using Prince | Jellby | ePub | 44 | 03-03-2015 03:21 PM |
Super-large pdf support on Jetbook/lite | halfgone | Ectaco jetBook | 4 | 12-29-2009 08:06 AM |
Easy PDF for the jetBook | Jack Tingle | Ectaco jetBook | 4 | 09-30-2009 04:39 PM |
PDF specs for JetBook? | Elfwreck | Workshop | 3 | 06-12-2009 10:39 PM |
prs-gen.pl :: Batch RSS->PDF Script | hrbrmstr | Sony Reader | 1 | 10-28-2006 11:53 AM |