Manuscript preparation
Why Copy-Pasting from PDFs Corrupts Your Manuscript's Formatting
“The PDF file format is all about producing the desired visual result for printing,” the documentation of the open-source library pypdf explains. “It was not created for parsing the content.”1 Those two sentences account for most of what goes wrong when an author recovers a manuscript by copy-pasting from PDFs. A PDF records where each character should be painted on a page, in which font, and at what size. It does not, in general, record that a group of lines forms a paragraph, that a word was hyphenated only because it fell at the end of a line, or that a block of text in the margin is a note rather than part of the main sentence. When text is copied out of a PDF, software has to guess at all of that structure, and its guesses arrive in the manuscript as formatting damage.
Authors meet this problem in several common situations: an old book exists only as a printer’s PDF and the original Word file is lost; a chapter is being reused from a published article; a co-author sends a PDF instead of a source file; or quotations are being lifted from research sources. This article explains the specific kinds of corruption that result, why each one happens, how to detect it, and which recovery methods do less damage. It draws on documentation from Microsoft, Adobe, the PDF Association, the Unicode Consortium, the W3C, and the pypdf project, and on a bug report from the GNOME Evince document viewer.
A PDF stores positioned glyphs, not paragraphs
The core difficulty is that a PDF is a description of pages, not a description of a document’s structure. The pypdf documentation states that “the text within a PDF document is absolutely positioned,” and that PDFs have no stored information about headers, footers, tables, or paragraphs, so their boundaries can only be inferred.2 It adds that “PDF files don’t store text in a semantically meaningful way,” and concludes: “For this reason, text extraction from PDFs is hard.”3
Microsoft’s support page on opening PDFs in Word makes the same point from the receiving end. When Word converts a PDF, it makes a copy and attempts “to match layout of the original PDF,” but the page cautions that “most PDFs don’t include information about structural content elements, such as paragraphs, tables, or columns.”4 It warns that “sometimes, Word doesn’t detect an element, and so the Word version doesn’t match the original PDF file.”5
There is an exception that matters. A tagged PDF carries an additional structure layer that records headings, paragraphs, lists, and reading order, mainly for accessibility. Rick Borstein, writing on Adobe’s blog in 2007, explained that tagged PDFs record “where paragraphs start and stop,” which is why adding tags in Acrobat can improve the text that copies out of a file.6 Many PDFs produced for printing, however, are untagged, and any PDF made from a scan contains no text at all until optical character recognition has been applied.
Every printed line can become a hard return
The most visible symptom of copy-pasting from PDFs is a paragraph return at the end of every line. Borstein’s Adobe post describes it directly: “Depending on how the PDF was created, each line may have a paragraph return at the end.”7 In Word, each of those returns starts a new paragraph. The pasted text looks correct at first, because the lines break where they broke on the printed page, but as soon as the font, margins, or trim size change, the text breaks into ragged fragments.
Hard returns do more than spoil the look of the text. Each line-ending return creates a separate paragraph, so a paragraph style applied to “the paragraph” now affects only one line of it. Widow and orphan control, first-line indents, and space-before settings all behave as if every line were its own paragraph. A typesetter receiving such a file must first rejoin the lines, and the work of distinguishing a true paragraph end from a line end is slow and error-prone, especially in dialogue, verse, and lists, where short lines are legitimate.
Rejoining lines with a single global find-and-replace usually makes things worse, because it also removes the genuine paragraph breaks. Word’s Find and Replace can search for these invisible marks by code. A Microsoft TechNet Magazine list of search strings, drawn from Ed Bott and Carl Siechert’s Microsoft Office 2010 Inside Out, gives “^p” for a “Paragraph break,” “^l” for a “Manual line break,” and “^t” for a “Tab character,” and explains that such codes let a user find line-ending marks, for example to remove repeated breaks.8 A pasted PDF may contain either kind of break, so the first step is to display formatting marks and see which one the paste produced. A more reliable sequence is then to protect the real paragraph breaks first (for example, by replacing every double return with a temporary marker), then replace the remaining single returns with spaces, and finally restore the markers as paragraph breaks. This works only if the PDF text has a reliable signal for paragraph ends, such as an indent or a blank line, and it still needs a read-through afterward.
End-of-line hyphens become permanent hyphens
Printed books are hyphenated to keep lines even, and those hyphens exist only because of where a line happened to end. In a PDF they are ordinary characters. A bug report filed against the GNOME Evince PDF viewer describes the result: “When copying some texts with word hyphenation, the hyphen is literally copied, although it is just a symbol for human readability in the PDF file.”9 Pasted into a manuscript, “manu-” at the end of one line and “script” at the start of the next becomes “manu- script,” or, once lines are rejoined, “manu-script.”
These stray hyphens are difficult to find, because many of them form plausible words, and because legitimate compounds (“well-known,” “twenty-one”) contain hyphens too. A spell checker catches some, such as “manu-script,” but not those that split a word into two real words. The most dependable method is to search for every hyphen followed by a line break before the lines are rejoined, and to decide each case individually. Once the lines are joined, the evidence that a hyphen was a line-end artifact is gone.
The reverse problem also occurs. Some PDF viewers and extraction tools try to remove end-of-line hyphens automatically, and in doing so they can delete hyphens from genuine compounds that happened to break at a line end. Because the behavior differs among viewers and versions, the author cannot assume either outcome and should check a sample of hyphenated compounds against the PDF.
Ligatures and font encodings can turn letters into wrong characters
A subtler corruption affects individual characters. A PDF font has two jobs: drawing a shape on the page and telling software which character that shape represents. The PDF Association’s Akash Choudhary, writing in 2020, explains that “there are actually two different lookups (encodings) taking place: one is for the glyph (outline),” while the other supplies the character meaning that search and copying depend on.10 When text copies out wrongly, the cause is often that “the glyph lookup worked just fine, but the lookup of the Unicode representation did not.”11
Ligatures are a frequent trigger. Many book typefaces replace the letter pairs “fi” and “fl,” and sometimes “ff,” “ffi,” and others, with a single joined glyph. Choudhary notes that in the PDF Association’s diagnostic display, “‘L’ stands for ligature, which means that a glyph (outline) consists of two characters.”12 The Unicode Standard treats these ligatures as a matter of display rather than of text. Its FAQ on ligatures explains that “Typographic ligatures such as ‘fi’, ‘fl’, and ‘st’ were encoded for compatibility and round-tripping” with older character sets, and states: “Their use is discouraged. Ordinary typographic ligatures should be represented by letter sequences and handled by fonts.”13 A well-made PDF follows that model, painting a ligature glyph on the page while recording the underlying letters. If the PDF does not map that single glyph back to its two letters, copied text may lose the letters entirely (“ofce” for “office”), substitute an unrelated character, or produce a Unicode ligature character that looks correct but fails spell checks and searches. The pypdf documentation identifies the same ambiguity: “Should that be parsed as the Unicode symbol ‘ff’ or as two ASCII symbols ‘ff’?”14
Characters outside the basic Latin alphabet are at similar risk. Accented letters may be stored as a base letter and a separate accent, which can come apart on extraction. Curly quotation marks, dashes, and special symbols may paste correctly in one application and incorrectly in another, depending on how the PDF’s font encoding was written. After any paste from a PDF, the author should search for the replacement character (a box or question mark), for isolated accent marks, and for common ligature words such as “first,” “office,” “fluent,” and “different,” and confirm that each is intact.
Spaces are inferred, so words can merge or split
A PDF does not always contain space characters between words. A word may simply be painted at a position slightly to the right of the previous word, leaving the gap to be seen rather than encoded. The pypdf documentation notes that this representation “makes it very hard to guarantee correct whitespaces.”15 The PDF Association article shows that a space can also be represented as an empty glyph with a width, which software has to recognize as a space.16
When extraction software misjudges a gap, two kinds of error follow. Words can run together (“theauthor”), particularly in tightly set or justified text, and single words can split (“aut hor”) where letter spacing was loosened to justify a line. Extra spaces may also appear where a justified line was stretched. These errors survive into the manuscript and are not always caught by a spell checker, especially in proper names. A search for double spaces, and a careful read of names, catches many of them.
Reading order follows the file, not the page
On a page, a reader knows that a running head is not part of the first sentence, that a footnote belongs at the bottom, and that a sidebar sits apart from the main text. Copied text follows a different logic. The PDF Association explains that a PDF’s “content order” can differ from its “logical reading order,” and that search problems arise when “the text extraction and/or search software is using the file’s content order, not the logical reading order.”17 The same mismatch affects copying: a selection across a page can pick up a running head, a page number, or a caption in the middle of a sentence. Tagging addresses the problem only when the tags are correct. The W3C’s accessibility technique on PDF reading order states that “The reading order of a PDF document is determined primarily by the tag order of document elements,” and that “Logical structure is created when a document is saved as tagged PDF.”18 It warns that for a multi-column page, “if the document is not properly tagged, a screen reader may read the document from top to bottom, across both columns.”19 The W3C’s concern is assistive technology, but software that copies or exports text faces the same choice between the visual layout and the stored order, which is why two-column pages from an untagged or badly tagged PDF so often arrive in a manuscript with lines from both columns interleaved.
The pypdf documentation lists these elements as open questions for any extractor. Of page headers and footers, it asks: “Similar to page numbers - should they be extracted?” and notes that “typically, tables are just absolutely positioned text.”20 Microsoft’s page on opening PDFs in Word warns that footnotes are a particular weakness: when Word does not recognize one, it “treats the footnote as regular text and might not put it at the bottom of the page.”21 It also lists tables with cell spacing among the elements that may not convert well, explaining that PDFs store tables as “a set of lines without any relationship to the content inside the table cells.”22
For a book manuscript, the practical consequence is that every page break in the source PDF is a potential site of contamination. Running heads, folios, and footnote text must be removed or moved to their proper place, and two-column pages may need their columns put back in order by hand.
Pasting as plain text trades one problem for another
The paste options in Word determine which formatting comes across with the text, and none of them is free of cost. Microsoft’s documentation describes “Keep Source Formatting” as retaining “formatting that was applied to the copied text,” “Merge Formatting” as discarding “most formatting that was applied directly to the copied text” while keeping bold and italic emphasis that covers only part of the selection, and “Keep Text Only” as discarding “all formatting and nontext elements such as pictures or tables.”23 The same page notes that “by default, Word preserves the original formatting when you paste content.”24
Keeping source formatting brings in the PDF’s fonts, sizes, and positioning as direct formatting, which then conflicts with the manuscript’s styles and must be cleared before typesetting. Keeping text only produces a clean string, but it strips italics, which in a book manuscript carry meaning: titles of works, foreign words, emphasis, and ship names. Merge formatting is often the most useful compromise for prose, because it preserves partial-selection italics while discarding most of the PDF’s layout formatting.25 Whichever option is used, the italics in the pasted text should be checked against the PDF, since a missed italic is invisible until a reader notices it in print.
Recovery from a PDF is a conversion project, not a paste
When the PDF is the only surviving copy of a book, a structured conversion is safer than piecemeal copying. Borstein’s Adobe post notes that Acrobat Standard and Professional can save PDFs to “editable formats such as text files, rich text files and Word,” which generally removes the hard line endings, and that adding tags before export helps preserve paragraph boundaries.26 Word can also open a PDF directly and convert it, with the limitations Microsoft describes.27 For a scanned PDF, the pypdf documentation advises that it is “recommended to directly use OCR software as errors can accumulate” when text extraction is layered on top of image-based pages.28
Conversion still has to be followed by systematic cleanup and a full proofread against the PDF. A reasonable sequence is to convert the whole file once; remove running heads, page numbers, and other page furniture; rejoin lines and resolve end-of-line hyphens; check ligature words, accented letters, and special characters; restore italics and other meaningful formatting; move footnotes to proper note references; and only then apply the manuscript’s paragraph styles. Doing these steps in this order prevents later steps from destroying the evidence the earlier ones need. A file that has been converted this way is a new edition of the text and deserves a full proofreading pass by someone who compares it line by line with the source.
The more lasting lesson concerns what an author keeps. A print-ready PDF is an output, built for a printer, and it is a poor source for any future edition, ebook, or translation. The asset that makes those later projects cheap is the edited source file with its styles intact. An author who archives the final Word or layout file alongside every PDF, and who asks freelancers to deliver both, avoids the whole problem described here. An author who keeps only the PDF has, in effect, kept a photograph of the manuscript and will pay for the difference when the book needs to change.
Related articles on selfpublishingtool.com
- What Makes a PDF Print-Ready?
- Why Ligatures (fi, fl, ffi) Break Search Functions in Certain PDF Viewers
- Hunting Gremlins: Invisible Unicode Characters That Break Typesetting Software
- How to Clean Up a Manuscript Written Across Google Docs, Scrivener, and Word
- Why Smart Quotes Turn into Question Marks During File Conversions
- The Ghost-Publisher Problem: Who Owns Your Files When a Freelancer Vanishes?
Platform rules, fees and laws change. Facts in this guide are dated to when they were checked; confirm current terms with the platform or authority before relying on them. Nothing here is legal, tax or financial advice.