06-08-2012, 07:58 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jun 2012
Device: kindle
|
Converting to PDF help? Bad page breaks and no TOC produced.
For some reason I can't seem to find anything regarding converting to PDF from a format. I am trying to convert from a MOBI to a PDF.
I have an AVS document converter tool that gets page breaks and right but messes up on quotation and a few other characters, plus there is now TOC. I have been messing with Calibre and not having much luck there aside from the characters aren't messed up. Here are the problems I'm having: 1) Page breaks, the converted PDF has page breaks in the middle of sentences and images. I have tried converting from HTMLZ with this //*[name()='h1' or name() = 'img']. To try and detect these attributes but no luck. 2) No TOC generated. 3) The generated PDF has a huge right margin, like half the page. So could someone give me some tips or point me to a good tutorial for converting to PDF. And before you say PDF is a bad format. I'm going to it because i really like reading my educational books on Preview on my MacBook Pro |
06-11-2012, 10:03 AM | #2 |
Connoisseur
Posts: 86
Karma: 186294
Join Date: Jun 2011
Device: Kindle k3G 3.4.2; DXG 2.5.8; DXG 3.1; Iriver Story HD
|
Calibre uses the QT QPrinter widget to generate a pdf and that causes bad pagebreaks. Calibre first converts any file format to html and then uses QPrinter to create the pdf the same as the webkit browser. There are better programs available to convert from the html to pdf without the bad pagebreaks. What I do is convert the ebbok to htmlz and then unzip to find the index.html file. Then you can convert the html to pdf using a browser with a pdf printer and save to file. I have also tried the xhtml2pdf program and the wkhtmltopdf with patched QT static version. I prefer the xhtml2pdf except I had to learn to do that just the way I wanted. I think you can find what you want with these alternatives.
. |
Advert | |
|
06-12-2012, 11:43 AM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
How do you unzip htmlz? Somehow I am not able to unzip it.
Please |
06-13-2012, 11:11 AM | #4 |
Connoisseur
Posts: 86
Karma: 186294
Join Date: Jun 2011
Device: Kindle k3G 3.4.2; DXG 2.5.8; DXG 3.1; Iriver Story HD
|
The book.htmlz is just a zip archive. Maybe rename to book.htmlz.zip or book.zip would help your computer recognize the archive as a zip.
|
06-13-2012, 05:27 PM | #5 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
Thank you, that worked!!
|
Advert | |
|
06-16-2012, 02:29 AM | #6 |
Connoisseur
Posts: 63
Karma: 10
Join Date: Nov 2010
Device: iPad
|
donB006 - thanks for the excellent post. It worked and I have a GREAT looking PDF file.
|
07-24-2012, 10:36 PM | #7 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jul 2012
Device: onyx boox m92
|
donB006...
I too have a nice looking PDF, but I can't for the life of me get a table of contents with links to the chapters. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF to EPUB - page breaks | pops1959 | Calibre | 0 | 01-13-2011 07:28 PM |
Converting a web page to epub with TOC | philosopherdog | Calibre | 5 | 07-23-2010 07:55 AM |
PDF conversion breaks links, TOC | ToddA | Calibre | 3 | 02-06-2010 04:43 AM |
Any way to force page breaks when converting HTML to EPUB | Bierkonig | Calibre | 23 | 10-31-2009 01:51 PM |
PDF to LRF with page breaks | jupinator | Calibre | 0 | 07-27-2009 03:57 PM |