Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2017, 12:43 AM   #1
r728626
Member
r728626 began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2017
Device: pdf windows 7
pagebreak for .txt into .pdf

The tables of a .txt are:
Code:
title of the book 120
---------------------------------
-------------------------------
--------------------
(two empty lines)
(two empty lines)
I read the sticky topic in this forum, but "h2" "h3" are too strange terms for me. My resolution would be calibre adjust this model as a NEW PAGE, and convert the .txt in the exacly number of pages as it was before converting from .pdf.

Please consider the most practical answer. I'm on windows 7 64bit. Calibre 3.14
r728626 is offline   Reply With Quote
Old 12-26-2017, 04:12 PM   #2
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
I'm not quite sure that I fully understand your issue but I have contributed a few books to mobileread's public domain library and these all started life as plain text, (.txt), documents so maybe I can point you in the direction that I found helpful.

There's a really simple technique that you can use with .txt files which can lead to a good conversion with calibre and it's called Markdown. It only takes about 15 minutes to learn and can then be applied manually or semi-automatically, (regex), to your text file. There's nothing to install, just learn the syntax here: https://daringfireball.net/projects/markdown/basics

Markdown will let you apply headings, sub-headings, section headings, bold, italic, item lists, footnotes etc. to your plain text without any need to use HTML. It's elegant and practical.

For example:

to apply a level 1 heading, (h1), start a line with: #

to apply a level 2 heading, (h2), start a line with: ##

for level 3, (h3), start with ###

(These may actually be a good start for you since you have already mentioned h2 and h3).

For conversion purposes the magic happens by using calibre's "TXT Input" options during conversion.

Set Paragraph style to "off" and Formatting style to "markdown" and calibre will do the rest: all your careful markdown will be used to produce a well styled document.

Calibre will convert lines starting with # to h1, lines starting with ## to h2, ### to h3 etc. and the default structure detection options will ensure a page-break before your h1 and h2 lines.

Incidentally, why do you particularly want to generate a PDF document?
Agama is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Txt to PDF Troubles marshies Conversion 0 03-14-2011 12:12 AM
Which is best for PDF and TXT? nomadwa Which one should I buy? 0 02-13-2011 08:37 PM
pdf to txt conryf Calibre 1 05-24-2010 11:41 AM
PDF to TXT, which program? bralec Sony Reader 4 02-17-2008 06:34 AM
conversion - pdf to txt? fishcube Sony Reader 1 10-24-2007 02:02 PM


All times are GMT -4. The time now is 05:12 AM.


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