Saifullah Ahad

All one hundred eight build stories

IdamatramLive on Google Play

How to copy comments from one PDF to another

If you're working out how to copy comments from one PDF to another after a handout was revised, start with the words you highlighted. A paragraph can move to a new page, and a sentence can stay on the same page while a crucial number changes.

Can you select the passage?

Open both editions. Try selecting a few words from the old passage, then search for them in the new PDF. If the page is just a scanned image, dragging over a line may select the whole page. W3C explains that on an image of text, "users cannot select, edit, resize, or reflow text". For that page, ask for a searchable edition or compare the two pages by eye. W3C guide to scanned PDFs

How to copy and paste comments from one PDF to another

For a few comments, use a PDF reader that lets you attach a note to a highlight. Make a working copy of the new edition and keep the marked original open beside it.

  1. Find the sentence. Search the working copy for a distinctive phrase from the old highlight. If it appears twice, read the heading and the paragraph around each match. If the search comes up empty, try a shorter phrase.
  2. Read your comment against the revision. If it still fits, copy the text of the old comment. Highlight the relevant words in the working copy, attach a note, and paste the text there. If the passage is gone, keep the comment with its old page number and a few words of context.
  3. Reopen the saved copy. Look for one transferred highlight and open its note. GNOME's guide explains how its reader saves the marks. "Annotations are added according to the PDF specification." Check that you can read the comment in the reader you plan to use. GNOME guide to saving an annotated PDF

One canal, two distances, twelve notes

I built Idamatram to transfer comments from one PDF to another on Android. Pick the marked edition and the revision. For an automatic match, the app checks the surrounding sentence and which words the new highlight would cover. When two passages look alike, it can use the surrounding words to tell them apart. If the choice is still open, you can inspect the suggested places.

In the built-in rivers handout, nine of twelve notes move automatically. Two need a decision, and one has no new passage. One decision is on page 2 in both editions. The old passage says the canal crosses the valley for nearly 38 kilometers. The revision changes 38 to 41. Read the margin comment and decide whether it still belongs with the new distance.

Highlighted passages in the rivers handout with their comments in the right margin. A question mark appears beside the canal passage.
The dashed brace singles out the canal note for review.
The old passage shows 38 crossed out and the new passage shows 41 underlined. The margin comment asks for a comparison with page 2.
Both passages are on page 2. Only the distance changed.
Where the twelve notes went in the saved example
NotesPlace in the copy
10On the text. The reader accepted the canal note alongside the nine automatic matches.
2On the last page. One passage still had two possible places. The other had no match.

Save the result under a new name. This gives you a third PDF and keeps both editions intact. The app carries comments attached to highlights, underlines, strikeouts, and wavy underlines on selectable words. It lists freehand marks, sticky notes, and stamps at the end. It cannot read handwriting or recover words from an image.

What was not checked

The release checks used the built-in handout on a Galaxy Tab S3 and an Honor Pad X7. Nobody's own marked-up PDF was used in those checks. Testing covered Latin text. How well the app places comments in other writing systems or in a reader's own course materials is still an open question.