pdf

converting text to pdf

Intro I keep a store of some of my emails as PDFs which I later have print and bound. So, what to do when some of those emails are sent in plain text instead of pdf format? Convert to PDF so they can be bound uniformly. From xmodulo1, there is a two-step process (after dependencies are acquired). Probably there’s a nifty way to do this in one-line, but I haven’t figured it out yet.

pdflatex not an option anymore in TeX-command-list

Problem: in .tex files the pdflatex compile option was gone For years I built tex into pdf with pdflatex; I just hit C-c C-c and there it was. But now having just rebuilt my system with Guix, I find that pdflatex isn’t on the list of compilation commands. This is despite the fact that the command pdflatex works from the commandline. Does anyone know where it went in auctex, and how to get it back?

Compress (bulk) pdf with Ghostcript

One liner with ghostscript GS to make your pdf much smaller. Options for PDFSETTINGS are (in rank of output quality): /prepress /ebook /screen gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf En Masse Compression: 972M -> 457M I applied this with a script upon my 972M directory of hundreds of research pdfs, and the end result was less than half the size (457M). I converted each PDF to text, which is useful for most of them, and then moved each PDF to an “uncompressed” directory, then compressed that uncompressed/FILE.

Compress pdf with Ghostcript

One liner with ghostscript GS to make your pdf much smaller. Options for PDFSETTINGS are (in rank of output quality): /prepress /ebook /screen gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf Resources https://itsfoss.com/compress-pdf-linux/

Split/shorten a PDF with pdftk

You can use pdftk to reduce a 150-page PDF to a just the pages you care about. pdftk ORIG_FILE.pdf cat 1-5 output NEW_FILE.pdf

Extracting pages of pdfs

Using qpdf: qpdf --pages ./decree.pdf 1,11 -- ./fulldecree.pdf sup.pdf The cryptic – is because –pages allows pages to be extracted from multiple pdf sources

Emacs for Study: PDF Conversion and Editing

Sometimes in the process of studying it is desirable to take the papers you are researching, which usually come as PDFs, and to convert them to an editable form. After you’re finished editing the final product could be PDF, Microsoft Word, web HTML, or something else. As this is a process that I’ve required for a number of different reasons, this tutorial covers the tools I use. Unlike other tutorials I’ve done, this process utilizes several tools beyond emacs.