3

So, I have ultimately important lecture to give. Now, I have to add material to it. I was stupid enough to erase tex and all support files. It is a great deal - 12 pages. So, it would take me a day to retype it, a luxury that I do not have. So, is it any way at all to convert from pdf to tex, so that I can edit. Please help. Otherwise, is it possible to merge documents with pdf, and how, in detail.

3
  • 1
    Merging or extracting pages is possible in pdfLaTeX but I am not sure in pdftex. – Say OL May 2 '16 at 8:22
  • 1
    You could copy the text from the pdf and insert it in a new .tex file. But all formatting/math/etc will to be done again. – samcarter_is_at_topanswers.xyz May 2 '16 at 8:30
  • 1
    Are you sure this is a pdftex question? Or are you just adding this tag because your question related to PDF and to TeX? – sheß May 2 '16 at 8:55
6

Short answer: No this is not possible

Long answer:

  1. You might try what @samcarted suggested and just copy and paste everying and add the formatting manually.

  2. Alternatively you could mix the old and the new slides/pages together by using pdfpages (not sure whether you're using beamer or article or something else, but the example should translate to other classes as well). Assuming your old document is named oldfile.pdfand you want to keep pages 2 and 3 from it, but add a new page 1 and a new last page, the following code will get you started. Note that you can also reorder the pages with this.

Code:

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
 New page 1
 \newpage
 \includepdf[fitpaper=true, pages=2-3]{oldfile.pdf}%this adds page 2-3 from the old file
 New page 4
\end{document} 
  1. As pointed out by @ProrroMannix, there are softwares around for conversion between pdf and word, these in combination with copy-and-paste might give you a better result than plain copy-and-paste, espacially regarding the handling of ligatures (as in your follow-up question: Segments of letters)
2
  • There is no other way then to do what he proposed. – nikola May 2 '16 at 10:04
  • 5
    There is no better way. Surprisingly, the PDF format is really low-level: It's just short strings of letters placed at particular coordinates in the page (though some documents have additional structuring information). To copy stuff out and paste it as plain text, programs have to guess even about where the word breaks are. – alexis May 2 '16 at 12:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.