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

6
votes
4answers
4k views

Split PDF into documents with several pages each

There are several resources on the web explaining how one can split a PDF into many files with on page per file. But how can you split them into chunks of, say, five pages each? I have looked into ...
2
votes
1answer
113 views

List named destinations in a PDF

How can I list the named destinations in a PDF file? Named destinations are the formal name for what you might call anchors. Major browsers jump to the named destination foo when you follow a link to ...
1
vote
2answers
419 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 ...
1
vote
0answers
28 views

Cannot print pdf from applicaton, lp works fine

Running Linux Mint 17.3 and I have installed a RICOH MP C3003 printer using cups with drivers obtained from http://www.openprinting.org PDF. The speciality may be that I have to use locked print at my ...
10
votes
6answers
1k views

Are there any full featured pdf readers that integrate comment function?

I'm needing reading some research papers whose formats are almost pdf.However I cannot find a good pdf reader which can make some notes while reading. Currently I use xournal however there seems not ...
3
votes
0answers
46 views

Unix way to extract vectorised image and its graph from a PDF file?

Data: one LHC thesis' page 16, where the picture is vectorised (most probably .eps). I am reviewing the answer here of the thread Software needed to scrape data from graph. I cannot find any tool ...
0
votes
2answers
71 views

Why does this gs command fail on --filename.pdf?

System: Ubuntu 16.04 64 bit. Code from here gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=newfile.pdf badfile.pdf Outputs: Usage: gs ... -- file.ps arg1 ... argn The expected ...
4
votes
1answer
432 views

Printing on custom paper size / adding paper size to PPD

I have some trouble when printing to custom paper sizes. Currently, I want to print something to a 21cm x 21cm card. So, I created a document with this size in libre office and exported it to PDF. ...
1
vote
0answers
31 views

collect and print multiple pages to single pdf file in linux

I have to print multiple documents from different applications (browsers, pdf readers etc) and print to a pdf file. What I want to do is collect the documents when i 'print' from these applications ...
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 ...
3
votes
1answer
90 views

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__': ...
5
votes
1answer
287 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
30 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 ...
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
26 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
478 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 ...
19
votes
7answers
42k 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
117 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
104 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
23 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
10 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
37 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
51 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
15 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
35 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
53 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
28 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
28 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 ...
1
vote
0answers
27 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
47 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
34 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
37 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 ...
19
votes
4answers
23k 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
31 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
75 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
93 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 ...
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
26 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
82 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
416 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
657 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
32 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
102 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 ...