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 ...

learn more… | top users | synonyms

3
votes
1answer
54 views
+50

PDF output with correct spaces in code examples

I have been using rst2pdf and pandoc to convert the following reStructuredText into PDF: This is a python example:: def main(): print("Hello World!") if __name__ == '__main__': ...
4
votes
1answer
222 views

Can Zathura's “dual” page mode use a page offset?

When viewing PDFs that are setup for print, I often want to view facing page spreads. Typically PDFs are typeset such that the first page of the file/part/chapter always starts on a right page so ...
0
votes
1answer
29 views

Create a pdf from which images cannot be extracted [closed]

I would like to make a PDF (of a Libre-Office document) that has the following properties: The images it contains cannot be extracted and saved; It contains hyperlinks that should be keep on ...
10
votes
1answer
1k views

generate a hyperlinked table of contents and insert into existing PDF

I have an existing PDF (without any corresponding source file), and a text file which is a list of items referencing sections within the PDF file, along with a page number for each item. I would like ...
31
votes
7answers
4k views

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 ...
8
votes
1answer
8k views

How do I insert a blank page into a PDF with ghostscript or pdftk?

I have a PDF file that needs a blank page inserted into it every so often. The pattern is unpredictable, so I need a command that will allow me to fit one in wherever necessary. How can i do this?
1
vote
0answers
19 views

How to extract hocr file from PDF?

I'm creating an OCR-ed PDF through tesseract: tesseract input.tif out pdf But I also need the hocr and txt files. Recent versions of tesseract already solved this but because it requires compiling ...
1
vote
2answers
461 views

problem with text added to pdf under Xournal after exporting to pdf

Under Xournal, I add some text to a pdf file, and then I export to a pdf file. In the exported pdf file, the text I added is shown correctly, and selectable, but when I copy and paste the selected ...
18
votes
7answers
41k views

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" -- ...
3
votes
3answers
113 views

Recover just deleted scanned pdf without unmounting

I have just deleted a scanned pdf file. I'm trying to recover it with scalpel. The problem is that scalpel will recover many deleted files and names them numerically (e.g. 0001.pdf, 0002.pdf, ... ...
1
vote
3answers
95 views

Why 'cat' can't read content of pdf files?

When tried the command cat < 1.pdf it printed a very large output, which was totally incomprehensible to me. The content of 1.pdf was abc. The output was like this: ...
2
votes
0answers
21 views

How do I trace why printing pdf from Ghostscript vs Evince is different?

I'm trying to get a better sense of how the "Print to File" option works on Linux Mint. Basically, when I open a PDF with Evince and print it to PDF, the output is different from the original, and ...
0
votes
0answers
9 views

llpp shortcut for duplicating window

I'm using llpp to view PDFs. I'd like to have a keyboard shortcut (like Ctrl+n) which will open the current PDF in a new window. Any ideas?
3
votes
1answer
33 views

Command line: crop PDF to paper size (Fedora)

Tools like pdfcrop (from texlive) are great but they seem to be too focused on removing margins/white space. I'm trying to crop a set of letter pages (8.5x11 inches) to a size of 6x9 inches. I want ...
1
vote
1answer
38 views

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?
1
vote
0answers
11 views

Is there any way to recover unsaved annotations in Okular after system crash

Other popular PDF software such as Adobe Reader or Skim (on OS X) offer a functionality to restore your annotations after a system crash even if you haven't saved the file manually yet. Does Okular ...
1
vote
0answers
33 views

How to preserve clearness while converting jpg to pdf file?

I would like convert a jpg file (a photo taken of two pages of a book) to a pdf file, with the goal of making the pdf file look like pages of a regular ebook file in terms of page size and ...
3
votes
2answers
45 views

detect if PDF file is made from images

I'm trying to pre-process a huge amount of PDF files, many of them not actually text but images in order to move them to a proper location to OCR processing. The problem is I've tried to detect if ...
2
votes
0answers
20 views

epstopdf loose greek symbole

I'm generating a pdf using gnuplot this way: set term postscript color eps enhanced 15 set out '| epstopdf --filter --outfile=SD.pdf' replot set out Whereas the eps file generated contains the ...
3
votes
2answers
25 views

Concatenate PDFs but extend pdf's to be even number of pages

I want to concatenate a bunch of PDFs but for printing purposes I would prefer that empty pages are added to each document that have an odd number of pages. Can I do this with PDFTK?
1
vote
1answer
23 views

pdftoppm (v 3.0) very slow to convert thumbnail in newer version

On one of our local servers, I use pdftoppm (v 0.18.4) to capture the first page of a pdf file as a 1200px wide jpg. It's very quick, and works very well. I'm doing it like so: pdftoppm -f 1 -l 1 ...
0
votes
0answers
25 views

Is there a common way to render out pdf files in a human-readable format on the command-line and keep the general layout?

I'm imagining something deeper than pdftotext (part of poppler-utils), because what I was imaging would be possible, would be to retain most of the layout on a virtual page, e.g. pipe this through a ...
1
vote
1answer
38 views

Is Evince a secure way to view malicious PDF?

I've seen that PDF's can contain malicious Javascript that operates in the background and can do bad things. This is primarily a problem for Adobe Acrobat. However, is this problem also for Evince? I ...
1
vote
1answer
33 views

Highlights cover text in Evince

How can I make Evince show this text properly? The highlights have been taken with PDF XChange Editor, and other software (qpdfview for example) shows them correctly. Evince is v. 3.10.3. This is ...
0
votes
0answers
32 views

How to split a A4 Letter page pdf into 2 4x6 pdfs

I get pdfs in A4 Letter size in portrait orientation, they have 2 sections top and bottom each 4x6. Right side of pdf is blank. I need to spit them into 2 pdfs 4x6 or 2 pages of the same pdf.. Ive ...
18
votes
4answers
22k views

View pdf file in terminal

I want to see pdf files available on our cluster rather than copying them into my local machine and than visualize. Please tell me how can i do this.
1
vote
0answers
29 views

How to remove zoom information from a PDF bookmark

I have a PDF file with bookmarks (aka index and document outline), which seem to specify the zoom in which the document is displayed after the link is followed. I know this because when I view the ...
2
votes
3answers
2k views

How to mount a .jpg centered into a .pdf (using defined page size and borders)?

I'm looking to convert a .jpg into a .pdf, so that the .jpg is positioned at a certain location: centered on (say) an A4 page, with a minimum border of 30 pixels all around between image and page ...
0
votes
2answers
54 views

Conversion of PDF to PS

I'm quite new to shell scripting. I need to create a script or reuse a script that converts PDF to PS (Post Script) files, is there anyway this can be done?
1
vote
0answers
14 views

pdf viewer with two-sided option

I am looking for a pdf viewer, that is able to show two pages side-by-side, like they would be printed in a book. (Just like Preview does on Mac OS X) I am using GNOME on Debian and already looked ...
6
votes
1answer
3k views

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 ...
1
vote
1answer
77 views

Write PDF metadata from the file name using Exiftool or PDFtk

I have thousands of PDF files named in the format Author Year Title of the book The first two spaces are relevant: they make a break between the Author, the year and the title. The title could ...
1
vote
1answer
220 views

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

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 ...
13
votes
8answers
13k views

Add and edit bookmarks to pdf

By getting metadata from some pdf files with bookmarks by pdftk, I observe the format of bookmarks in pdf metadata. So I am guessing that with pdftk, it is possible to add and edit bookmarks of a pdf ...
2
votes
1answer
23 views

Is it possible to send an xpdf process a signal that causes it to reload the file being displayed?

On page change, redraw, or Reload command, xpdf will reload the file it is currently displaying. Is it possible to cause xpdf to reload the file by sending a signal? Which signal? (I am basically ...
1
vote
2answers
56 views

Create one pdf out of multiple (selected) images

To convert multiple images to pdf this script will do that for all images inside a folder: #!/bin/bash # for f in *.png; do convert ./"$f" ./"${f%.png}.pdf" done But each image is converted into ...
3
votes
3answers
389 views

How can I shuffle pages from a pdf file in a random order?

I would like to shuffle the pages of a pdf document in a random order. How can this be done?
6
votes
2answers
2k views

How to convert libreoffice ODT to PDF in bash

I am using libreoffice under CentOS 6. I can convert ODT files to PDF with: libreoffice --headless --convert-to pdf *.odt but the problem is that it only works when no document is open in ...
10
votes
1answer
653 views

How do I 'unbook' a pdf

I have a pdf file that was made into a booklet format. It is meant to print on A4 paper in landscape orientation; here are two pages in the pdf, which should correspond to four pages in the actual ...
10
votes
7answers
10k views

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? ...
1
vote
0answers
29 views

concat pdf pages after pdfcrop

I ran pdfcrop to crop the whitespace from pdf. As expected, the result is a pdf with pages of varying sizes. Is there any way to "squash" all these pages so they nicely fit in A4 (or any other format) ...
2
votes
3answers
97 views

Searching a keyword in multiple pdf files

I want to search for a specific keyword in multiple pdf file using pdftotext command. Normally we can search inside a single pdf file using the following command: pdftotext file.pdf - | grep keyword ...
2
votes
2answers
263 views

Using Evince instead of Okular for Alpine (MIME configuration for PDF viewers)

Within Alpine, if I hit enter on a PDF attachment, my system brings up Okular. I would prefer if it brought up Evince, because that's the PDF viewer I normally use. How can I do that? This is clearly ...
1
vote
1answer
360 views

Splitting a PDF file with Ghostscript results in one extra blank page

I try to split the pages of one PDF file into a separated one-page PDF files. This command does the job so far: gs \ -q \ -dQUIET \ -dSAFER \ -dBATCH \ -dNOPAUSE \ -dNOPROMPT \ ...
1
vote
2answers
53 views

How are GNU documents in PDF formats created?

Some GNU software doesn't offer PDF files for its manual, e.g. http://www.gnu.org/software/findutils/manual/find.html Some does, and their PDF files have bookmarks/outlines, e.g. ...
3
votes
2answers
94 views

Printing two pages per sheet from the command line

Say I start off from a PDF document, say of 12 pages, viewed with evince. To produce another PDF of 6 sheets, with a page setup of two pages per side, I normally use the "Print to File" device ...
1
vote
0answers
81 views

CUPS-PDF is very slow

I'm using CUPS-PDF printer to produce PDF files. Everything works properly, but problem is the time which CUPS-PDF printer needed to complete a job. For a PDF file with 25 pages CUPS-PDF need more ...
9
votes
5answers
2k views

How to merge 2 PDF files with interleaving pages order?

I've got a double-side-printed multipage document to scan with a linear bulk scanner. So, as the result I get 2 PDF files: one containing all odd pages and the second containing all even pages. I need ...
0
votes
1answer
27 views

How to convert the manpages of git and its subcommands into a pdf file?

There are two places that I can find manpages of git and its subcommands: https://git-scm.com/docs, and the links to all the git subcommands ...
40
votes
6answers
22k views

Split pages in pdf

I have a scanned pdf file which has scanned two pages on one virtual page (page in pdf file). The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the ...