Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2008, 06:38 AM   #1
caritas
Enthusiast
caritas doesn't littercaritas doesn't litter
 
Posts: 26
Karma: 161
Join Date: Feb 2008
Device: Sony PRS505
HTML to PDF via mozilla

About
-----

Convert HTML to PDF with mozilla rendering engine.

The best rendering application of HTML is web browser such as
FireFox(Mozilla), but full function web browser is too large for some
devices such as ebook reader. One of the solution is to pre-render
HTML on PC with web browser and send the resulting PDF to devices.


* Usage and configuration

Make sure you have Xulrunner correctly installed.

xulrunner --app html2pdf/application.ini [-pw <width>] [-ph <height>] \
file:///tmp/foo.html /tmp/foo.pdf

-pw and -ph is to used to specify paper width and height.

mb_html.tar.gz and mb.pdf is an example html and result.
Attached Files
File Type: gz mb_html.tar.gz (57.2 KB, 693 views)
File Type: gz html2pdf.tar.gz (10.8 KB, 760 views)
File Type: pdf mb.pdf (56.0 KB, 1527 views)
caritas is offline   Reply With Quote
Old 12-16-2008, 12:36 PM   #2
bill_mchale
Wizard
bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.bill_mchale ought to be getting tired of karma fortunes by now.
 
Posts: 1,451
Karma: 1550000
Join Date: Sep 2008
Location: Maryland, USA
Device: Nook Simple Touch, HPC Evo 4G LTE
Mmm, I haven't tried this particular method, though when I tried to save html files as PDFs using firefox on the Mac, I ended up having limited success. I might have had more luck if I rewrote the style sheets. That being said, I was trying to save the file as a PDF defined for a 5" screen.

I found PrinceXML handled the job very well once I defined the style sheet for my reader.

--
Bill
bill_mchale is offline   Reply With Quote
Old 12-16-2008, 07:41 PM   #3
Elfwreck
Grand Sorcerer
Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.
 
Elfwreck's Avatar
 
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
Quote:
Originally Posted by bill_mchale View Post
That being said, I was trying to save the file as a PDF defined for a 5" screen.
--
Bill
I made print settings for Acrobat to save for the Sony reader; 3.47x4.86" pages and 166dpi. It's what I use when converting from Word, but should work with HTML just fine.

For people with Acrobat Pro, it can either go in C:\Program Files\Adobe\Acrobat 7.0\Distillr\Settings or C:\Documents and Settings\All Users\Documents\Adobe PDF\Settings. People using other print drivers would have to look for where the options for those are saved.
Attached Files
File Type: zip SonyReader-PDFjoboptions.zip (4.0 KB, 577 views)
Elfwreck is offline   Reply With Quote
Old 12-16-2008, 08:25 PM   #4
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,158
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by Elfwreck View Post
I made print settings for Acrobat to save for the Sony reader; 3.47x4.86" pages and 166dpi. It's what I use when converting from Word, but should work with HTML just fine.

For people with Acrobat Pro, it can either go in C:\Program Files\Adobe\Acrobat 7.0\Distillr\Settings or C:\Documents and Settings\All Users\Documents\Adobe PDF\Settings. People using other print drivers would have to look for where the options for those are saved.
I'm going to have to try this.
Amalthia is offline   Reply With Quote
Old 12-17-2008, 03:07 AM   #5
Elfwreck
Grand Sorcerer
Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.Elfwreck ought to be getting tired of karma fortunes by now.
 
Elfwreck's Avatar
 
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
Quote:
Originally Posted by Amalthia View Post
I'm going to have to try this.
Is very simple. It's settings that anyone could do--if they knew which of the dozen-odd buttons in the dialogue box to click on, and which tab to select, and when to click "Options," and which dropdowns are useful and which ones to skip because the later click will invalidate them...

Once you know the settings exist, it's a matter of seconds to set them, but it's nice to have a saved set for whatever kinds of PDF conversion you do most often.

Once this is installed, you can use Word, change your page size to 3.47x4.86 with whatever margin you like, and in the Adobe PDF menu, click "Change conversion settings."
Elfwreck is offline   Reply With Quote
Old 12-26-2008, 05:20 PM   #6
Bookathon
Bookaholic
Bookathon doesn't litterBookathon doesn't litter
 
Posts: 72
Karma: 142
Join Date: Dec 2008
Device: Kindle 1, 3, Ipad
Elfwreck

I read from How to create optimized sony pdf, and they mention 3.47x4.54 page size for sony 505 and your settings are little off, any particular reason?
Bookathon is offline   Reply With Quote
Old 12-26-2008, 05:56 PM   #7
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Bookathon View Post
I read from How to create optimized sony pdf, and they mention 3.47x4.54 page size for sony 505 and your settings are little off, any particular reason?
The page size information in the Sony doc is rather off. Quite a while ago I produced Reader page-size tester PDFs which demonstrate the actual correct page size is exactly 88.184 x 113.854mm.
llasram is offline   Reply With Quote
Old 12-26-2008, 09:57 PM   #8
Bookathon
Bookaholic
Bookathon doesn't litterBookathon doesn't litter
 
Posts: 72
Karma: 142
Join Date: Dec 2008
Device: Kindle 1, 3, Ipad
llasram

I just happen to notice if you are in landscape mode the last line in bottom is dim as compared to other lines and it only happens in landscape mode, in portrate mode if text flows in that area, it would not exhibit any anomaly, changing text size does not not make a difference, still that area is murky, I happen to read some pdf in landscape mode, therefore noticed it
Bookathon is offline   Reply With Quote
Old 12-27-2008, 01:12 AM   #9
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Bookathon View Post
I just happen to notice if you are in landscape mode the last line in bottom is dim as compared to other lines and it only happens in landscape mode, in portrate mode if text flows in that area, it would not exhibit any anomaly, changing text size does not not make a difference, still that area is murky, I happen to read some pdf in landscape mode, therefore noticed it
If I understand you correctly, I believe what you're seeing is the way is the way the Reader PDF renderer indicates the overlap between the two "halves" of the page. If the screen-width is scaled to fill the screen-height, that results in a scaling factor of (113.854mm / 88.184mm) = 1.291. Multiplying that times the page height yields a scaled height of 146.985mm, which is less than 2x the screen width (176.368mm). Sony fills in the extra space by having 14.691mm of each screen-page overlap content with the other screen-page showing the same PDF-page. It indicates this overlap with the fairly subtle graying effect.
llasram is offline   Reply With Quote
Old 12-30-2008, 01:55 PM   #10
Bookathon
Bookaholic
Bookathon doesn't litterBookathon doesn't litter
 
Posts: 72
Karma: 142
Join Date: Dec 2008
Device: Kindle 1, 3, Ipad
llasram

Thanks, it makes lot of sense.
Bookathon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF to HTML Mamaijee Calibre 3 10-01-2010 12:45 AM
Calibre Recipe HTML content differs from raw html of index.html. krunk Calibre 4 09-20-2010 09:48 PM
PDF to HTML ThomasMcKean Calibre 1 01-08-2010 05:49 AM
PDF, HTML, Comics Operator23 Which one should I buy? 9 12-30-2008 03:22 AM
PDF and HTML Highlighting possible? mabhobs iRex 1 07-21-2007 03:10 AM


All times are GMT -4. The time now is 06:33 PM.


MobileRead.com is a privately owned, operated and funded community.