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"
733 questions
0
votes
1
answer
28
views
How to proportionally scale all pages in a PDF file to a given width without rotating them
I have some files, each of which consists of several pages. In most of the files the pages have no common width (and height). I'd like to define some common width and then scale all pages ...
7
votes
3
answers
864
views
Open pdf files in the background with fzf
I want to fzf through all the pdf files in a directory, open it and release the terminal.
I tried
PDF_READER=okular # or evince
find -type f -name "*.pdf" -print | fzf --print0 | xargs -0 $...
1
vote
1
answer
81
views
Checking integrity of pdf-files from command line
I have a (visibly) damaged old CD with pdf-files.
When trying to read them, non showed anything in the pdf-reader.
Is there a way to check all of them via command line?
It is tiresome, time-consuming ...
1
vote
1
answer
105
views
Crop pdf removing content cropped away
I do have a pdf that contains a drawing, a part of which I would like to extract.
I am able to open the pdf in inkscape. However, it contains a group with 150k items. As far as I see, there are no ...
3
votes
3
answers
1k
views
How do I extract some pages of a PDF into another PDF file?
I have a PDF file with multiple pages, and I want to write a command which extracts some of these pages into a new, separate PDF file; and the pages of interest are not necessarily a contiguous range.
...
1
vote
0
answers
68
views
With ghostscript, how to upscale a PDF file that is wider than taller so that the new width matches the width of a portrait A4 sheet of paper?
Let's take a PDF file that is slightly wider than taller, e.g., https://we.tl/t-iihJ3gMsrA :
pdfinfo input.pdf | grep "Page size"
Page size: 397.349 x 378.153 pts
Let's try to upscale ...
-1
votes
2
answers
79
views
Fedora "Files" app gives wrong "Detailed Type" description
I'm on Fedora 41 (Gnome 47).
I installed Foxit Reader to read PDFs, didn't like it, and uninstalled it.
Now, the Detailed Type description in the Files program for all PDF documents is FoxitReader ...
0
votes
0
answers
30
views
Is there something which lets tesseract tell some OCR-quality measure?
I am on Ubuntu. Most of my scanned documents are German, English or French.
This question is related to my other question at Is there an option to let pdfsandwich try 90° rotations automatically ...
0
votes
0
answers
225
views
How to Make a Custom Banner Page on CUPS on Linux?
On macOS, the creation of banner pages for cups is simple: you create a file prepended with
#CUPS-BANNER
and then write certain parameters for headers, footers, and information to be displayed. ...
0
votes
2
answers
89
views
Does convert from imagemagick misinterpret the resolution- or density-related metadata of PNG?
Let's grab a DIN A4 paper sheet in PNG format from https://www.a4-size.com/download/335/?tmstv=1739899566 . After unpacking the obtained archive, we get a4-size-portrait-pixels-600dpi.png. Let's ...
0
votes
1
answer
79
views
A document format for grey scanned pages with better lossless compression (i.e., a smaller file) than PDF+Zip?
I have page_1.pnm, …, page_6.pnm, which represent 6 pages of a scanned document, all in gray PNM produced by scanimage and manually postprocessed with GIMP. The command
convert $(for i in 1 2 3 4 5 6; ...
0
votes
1
answer
107
views
From GIMP, how to store images losslessly at maximum compression when creating a PDF?
Assume an image opened in GIMP in Debian 12. From this image, you would like to create a single-page PDF file with maximum lossless compression. How? As of 2024-12-19, https://docs.gimp.org/en/gimp-...
5
votes
2
answers
776
views
Are there PDF files that pdfgrep cannot search yet display with xpdf?
I am on a Chromebook running Debian with pdfgrep v2.1.2. I have a PDF file of the full Mueller Report that I occasionally want to search for particular references. Pdfgrep of the file for any pattern ...
3
votes
1
answer
501
views
How to create new pdf with watermark, string and signatur with a script?
We have a folder with over 900 PDF documents, and these need to be watermark starting in january.
The watermark is available as a JPEG or PNG, along with a string containing various characters for ...
0
votes
2
answers
68
views
For what tasks Netpbm images are used? Why 'pdfimages' use it as a default 'format' for extracted images?
Normally, all images are written as PBM (for monochrome images), PGM (for grayscale images), or PPM (for color images) files. With this option, images in DCT format are saved as JPEG files. All non-...
1
vote
1
answer
205
views
How to use COMPRESSION_ADOBE_DEFLATE instead of DEFLATE?
When converting to PDF using ddjvu:
ddjvu -format=pdf input.djvu output.pdf
there is a warning:
TIFFWriteDirectorySec: Warning, Creating TIFF with legacy Deflate codec identifier, ...
0
votes
1
answer
79
views
How to concatenate various jpgs pngs and pdf into single pdf leaving their sizes as they where?
I am trying to make a kind of dossier out of various pngs,jpgs and single page pdf images. It has to be a single pdf file, but it doesn't matter that results into something conveniently printable. As ...
0
votes
0
answers
48
views
Remove PDF pages if content is subset of next page
I have a lot of uni-slides where a list of bullet points gets shown page by page until one slide contains all points.
For the sake of explaining a topic this is quite nice but for learning I would ...
0
votes
2
answers
146
views
Create pdf output file alternating pages between two files
I have a pdf file, let's call it A, composed of a lot of pages.
Then I have a second pdf file, let's call it B, composed of a single page.
My goal is to have an output file, let's call it O, with the ...
1
vote
1
answer
885
views
How to generate full-page QR code from command line?
I'd like to generate a full-page QR code from the command line. The following command sort of accomplishes this:
qrencode -o- https://example.net | convert png:- -gravity center -units pixelsperinch -...
0
votes
1
answer
56
views
double sided mpage
Hi I can easily use mpage to condense multiple single sided sheets on a single page. However I am finding it tricky to do the same for double sided sheets. In this case I am printing badges. Say my ...
0
votes
1
answer
125
views
Compare text in pdfs when text has been re-flowed
I'm trying to compare text between two versions of a PDF document. I was able to create a diff with pdftotext, format some replacements with perl and colordiff.
This output a lot of differences, but ...
0
votes
1
answer
117
views
pdfgrep multiple files with different passwords
I am trying to grep strings in password protected PDFs (credit card statements). There are multiple files with different passwords. The manpage(?) says --password=Value can be specified multiple ...
0
votes
0
answers
452
views
How do I create and retain bookmarks in qpdfview or qpdf? I was using Ctrl+b and saving my bookmarks but it's not permanent after restarting qpdf
I think the main question is self-sufficient. To add things that I tried: I am on a linux machine so I was trying opensource options, and qpdf was the software I was already using. Tried to seek ...
0
votes
1
answer
199
views
Print two half-sized copies of a two-sided document at once
I have a two-sided, us-letter format document that I'd like to print two copies at once, by resizing it to half letter (a.k.a. statement, or organizer L).
My current workflow is very inconvenient:
...