0

I have a job interview on Tuesday, and I need to correct a typo "obestiy" [sic] to "obesity" in a PDF from LaTeX that I cannot recompile due to missing images and tables.

I have tried

  1. qpdf general.audience.pdf --object-streams=disable expanded.pdf,
    as suggested by How to view and edit the code of a PDF file, but when I try to edit the file, "obestiy" doesn't appear, so this method didn't work.

  2. https://askubuntu.com/questions/803850/find-and-replace-with-on-pdf-file-from-command-line suggests that I can use qpdf thus:
    pdftk general.audience.pdf output uncompressed.pdf uncompress
    but then the word "obestiy" [sic] never shows up.

Perhaps there is/are some characters in between the letters, explaining why "obestiy" doesn't show up?

How can I edit the PDF to correct the typo?

  1. LibreOffice Draw distorts and ruins all of the text in the file, making the PDF unusable. Maybe there is a way for LibreOffice Draw to not alter the fonts?
con
  • 109
  • Upload the file somewhere and add the link to the file in your question. – Cyrus Apr 21 '23 at 23:50
  • Try converting the pdf to PostScript, eg with pdf2ps which is part of ghostscript, then with a text editor you might be able to find the string as (obestiy). It might be split into smaller strings. Convert back with ps2pdf. – meuh Apr 22 '23 at 10:07

1 Answers1

1

Without seeing the PDF file it's difficult to debug this. I would have suggested the same method (uncompress the streams in the PDF files, though I usually use mutool from mupdf to do this).

The PDF contains the actual glyphs that appear on the page, not the letters themselves.

So if you cannot find it by searching for the string "obestiy", possibly there are commands between the letters (for example, to do kerning).

Another possibility is that you are using some font where the glyphs in the font don't directly map to the letters.

So open up the uncompressed PDF in a text editor, look for the page you are interested in (or extract this page from the original PDF), and read it from top to bottom. That should give you an idea how pdflatex handled your file, and where you should look for your word.

dirkt
  • 32,309