DunneWrite · Tutorial
Import a PDF novel
Convert a PDF to clean text, remove the parts that would mislead the AI, and ingest it.
DunneWrite reads text, not PDF. If you pick a .pdf, the app stops and shows you how to
convert it instead of importing it, because a PDF read as text comes out as nonsense. In this
tutorial you'll convert a PDF novel, clean it up, and ingest it.
You'll need#
- A PDF of the book, whose text can be selected (not a scan of page images).
- The free
pdftotexttool, or any other PDF-to-text or PDF-to-Markdown converter:
| Platform | Where pdftotext comes from |
|---|---|
| Windows | It ships with Git for Windows. Open Git Bash and it is already there. |
| Linux | The poppler-utils package |
| macOS | brew install poppler |
- A text editor.
- A provider connected in DunneWrite. See Connect an AI provider.
Convert the PDF#
-
Open a terminal (on Windows, Git Bash) in the folder that holds the PDF.
-
Run:
pdftotext -layout "your-book.pdf" "your-book.txt" -
Open
your-book.txtand check that the prose reads normally.
Keep -layout. Without it, pages with any column structure interleave their lines and the prose
comes out shuffled. Conversion is fast: a 1,200-page novel converts in a few seconds.
Clean it up#
Conversion faithfully reproduces two things that belong to the printed page rather than to the book. Fix both before importing.
- Rejoin words split across a line break. Typesetting hyphenates words at the right margin, so
mur-at the end of one line andmuredat the start of the next should becomemurmured. Rejoin only when the next line starts with a lower-case letter, so that real hyphenated names such asBarrow-Downssurvive. A long novel can have hundreds of these. - Cut everything that is not the story. Delete the front matter, the table of contents, the appendices and, above all, the index.
Ingest it#
- Optionally, save the cleaned file as Markdown (
.md); Markdown is the preferred format. - In DunneWrite, open Ingestion Review and press Ingest a file — see the cost first….
- Pick the cleaned file, and answer honestly when asked whose writing it is and what kind of material it is.
- Read the cost screen, then start the run. A whole novel is a large run; consider trying a few chapters first.
What you've learned#
- DunneWrite takes text, and
pdftotext -layoutis a reliable way to get it from a PDF. - Rejoin line-break hyphens and remove the index before importing.
- Try a slice of a large book before committing the whole thing.
Next#
- Ingest your notes, for reviewing what was found
- Place characters on the Globe
Something unclear or out of date? Open a support ticket.