Questions tagged [pdf]

PDF (Portable Document Format) is an open standard for fixed format document exchange. Use this tag to indicate questions involving files in this format and also when software is generating/processing this format. When possible and possible relevant indicate the version of the PDF document (as retrieved from the file properties, or using "file document_name.pdf"

Tools used for manipulating PDF files:

Generation:

  • rst2pdf
  • convert (from imagemagick)

Conversion:

  • pdf2ps
  • pdftotext
  • pdftk

Extract metadata:

  • pdfinfo

GUI based editing:

  • pdfedit
693 questions
266
votes
18 answers

How can I grep in PDF files?

Is there a way to search PDF files using grep, without converting to text first in Ubuntu?
Dervin Thunk
  • 3,429
  • 4
  • 23
  • 21
255
votes
20 answers

How can I add a signature .png to a PDF in Linux?

I have a scanned copy of my written signature and I need to apply it to some documents in the signature block. I used to do this on Windows all the time but I now have only Linux. Is this possible? How can I add a signature image to a PDF file in…
Freedom_Ben
  • 4,284
  • 4
  • 22
  • 29
170
votes
10 answers

Command line: How do you rotate a PDF file 90 degrees?

When I scan documents that are landscape-oriented, the output PDF files are portrait and so all the PDF viewers display the scanned documents in portrait. From the command line, how do you rotate a PDF file 90 degrees? I tried searching and found a…
Trevor Boyd Smith
  • 3,772
  • 12
  • 36
  • 44
98
votes
11 answers

How do I create a blank PDF from the command line?

I recently needed a single blank PDF page (8.5" x 11" size) and realized that I didn't know how to make one from the command line. Issuing touch blank.pdf produces an empty PDF file. Is there a command line tool that produces an empty PDF page?
Brian Fitzpatrick
  • 2,755
  • 3
  • 23
  • 43
83
votes
2 answers

Discovering metadata about a PDF

Suppose I have a PDF and I want to obtain whatever metadata is available for that PDF. What utility should I use? I find the piece of information I am usually most interested in knowing is the paper size, something that PDF viewers usually don't…
Faheem Mitha
  • 34,649
  • 32
  • 119
  • 183
81
votes
11 answers

Split pages in pdf

I have a scanned PDF file in which two different real pages appear together on one virtual page. The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the right. Is there some command (convert, pdftk,…
xralf
  • 16,149
  • 29
  • 101
  • 149
78
votes
10 answers

View pdf file in terminal

I want to view pdf files directly on our cluster rather than copying them to my local machine and then opening them in a viewer. How can I view a pdf file in my terminal?
bioinformatician
  • 963
  • 1
  • 6
  • 9
78
votes
4 answers

How to OCR a PDF file and get the text stored within the PDF?

First, apologies if this has been asked before - I searched for a while through the existing posts, but could not find support. I am interested in a solution for Fedora to OCR a multipage non-searchable PDF and to turn this PDF into a new PDF file…
ingli
  • 1,665
  • 1
  • 15
  • 33
74
votes
11 answers

Pdf reader that supports XFA forms (while Adobe Reader for Linux is not supported anymore)?

XFA forms are features of a pdf file involving options to complete fields in certain documents - in many cases official documents. These options may open a calendar, for example, in order to select day, month and year, etc. Usually these forms…
user32012
73
votes
1 answer

Convert pdf to a different page size (US Letter -> A4)

I'm trying to print a simple US Letter document, but for some reason, I just cannot manage to fit it properly onto A4 when printing multiple pages per-list. I have tried converting the pdf using: gs -o print.pdf -sDEVICE=pdfwrite -sPAPERSIZE=a4…
Šimon Tóth
  • 8,098
  • 12
  • 40
  • 67
73
votes
12 answers

How to convert TXT to PDF?

I want to convert .txt files to .pdf. I'm using this: ls | while read ONELINE; do convert -density 400 "$ONELINE" "$(echo "$ONELINE" | sed 's/.txt/.pdf/g')"; done But this produces one "error" -- if there's a very long line in the text file, it…
LanceBaynes
  • 39,295
  • 97
  • 250
  • 349
66
votes
6 answers

pdf to jpg without quality loss; gscan2pdf

When I convert a pdf file to bunch of jpg files using convert -quality 100 file.pdf page_%04d.jpg I have appreciable quality loss. However if I do the following, there is no (noticeable) quality loss: Start gscan2pdf, choose file-> import (and…
student
  • 17,875
  • 31
  • 103
  • 169
62
votes
9 answers

convert images to pdf: How to make PDF Pages same size

I did something like convert -page A4 -compress A4 *.png CH00.pdf But the 1st page is much larger than the subsequent pages. This happens even though the image dimensions are similar. These images are scanned & cropped thus may have slight…
Jiew Meng
  • 2,393
  • 7
  • 24
  • 28
55
votes
6 answers

How to set password for pdf files?

I need to password protect my PDF file(s), because I am going to send them through email and I want anyone who would view my PDF file(s) to be prompted for a password. How can I add a password to a PDF in Linux Mint 17.1?
David
  • 711
  • 2
  • 7
  • 12
52
votes
4 answers

How do I reduce the size of a pdf file that contains images?

I have a pdf file that contains images and I want to reduce its size in order to upload it to a site with a size limit. So, how can I reduce the size of a pdf file from the command-line?
Pandya
  • 23,898
  • 29
  • 92
  • 144
1
2 3
46 47