2022 Developer Survey is open! Take survey.

Questions tagged [pdftk]

pdftk (PDF ToolKit) is a multiplatform open source tool for manipulating PDF documents.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

Re-Order pages of an 'Unbooked' PDF - Batch / GhostScript / PDFtk

Preamble: 'Unbooking' a PDF has been asked before. That said, I haven't found an answer to this specific part of the process. Thanks to extensive research and a lot of help from this site, I'm halfway ...
user avatar
  • 113
1 vote
1 answer
29 views

How to include file name in footnote of pdf file?

Is it possible to add pdf file name to footnote of each page of this file? Possibly with use of pdfunite or pdftk?
user avatar
0 votes
2 answers
52 views

Merge elements of 2 pdf pages in single one

I've 2 A4 pages from pdf. The first one contain the "content" of the page and second contain header and footer. Is it possible via command line to merge the content of these 2 pdf pages into ...
user avatar
  • 123
0 votes
0 answers
65 views

How to merging 2pdf's with pdftk where output file have name one of them

I have many pair's of PDF's to merging with different names. I need to merging pair, without the first page of the second PDF and call the output file the name of the second PDF. First pdf name's ...
user avatar
  • 1
0 votes
0 answers
43 views

Remove invisible elements from pdf

My question is quite similar to Remove text from pdf but instead of a specific string, I would like to remove any element that is hidden, or colored white (hidden with extra steps) (or empty I suppose)...
user avatar
1 vote
3 answers
233 views

PDFTK burst, initial file name control

Using to PDFTK burst a multipage PDF file into single files, I need a way for it to allow me to control the first file name and the number it starts for the output file naming convention. For example ...
user avatar
  • 99
1 vote
3 answers
224 views

Merging PDF files with PDFTK with the same 4 numbers in the file name

I have a folder with PDF files (C:\1_PDF). There's two types of file names, 330526.pdf and 000526.pdf. Those files names do change (increase by number) 330527.pdf, 330528.pdf, 330529.pdf. Same goes ...
user avatar
  • 99
0 votes
3 answers
379 views

Batch merging PDF files based on file name

I'm trying to find a program/script that can merge files based on the filename. Files are in 1 folder (output from PDF24 print to PDF) and names as the following example: File name layout: YYYY-MM-DD ...
user avatar
  • 11
0 votes
1 answer
22 views

PDF-Pages To PNG And Back To PDF In A Hotfolder Via Script

For security-reasons I want to decompose PDF-files and put them back together (like printing them and scanning them back in). I want to offer this for my users, so I would like to script a kind of ...
user avatar
1 vote
0 answers
147 views

How to place continuous numbering on PDF?

I want to place continuous numbering on a pdf document 1.5cm from the page edge. The numbering should run from the top to bottom of every page. This is similar to line numbering, however the ...
user avatar
1 vote
1 answer
152 views

Bulk PDF Encryption Using Bat - Change in Code Required

I found a code which applies random passwords to PDF files and saves it in a separate directory. Can somebody help me in modifying the code as per following requirement. Need a single password for all ...
user avatar
1 vote
0 answers
58 views

Add annotations for specific PDF pages using the command line [closed]

I have a PDF with 5 pages, and would like to add the annotations note 3 and note 4 at pages 3 and 4; where or how the annotations are styled doesn't matter. It should be an FOSS based solution.
user avatar
  • 398
0 votes
1 answer
158 views

BAT file Combining PDF files based on filename

I've been trying to combine PDFs with similar filenames together using a BAT file. I was using the method of using pDFTK shortcut, select PDFs I want to combine, and then "send to" the ...
user avatar
2 votes
1 answer
629 views

Why is pdftk no longer available on Cygwin?

pdtfk is often considered the go-to non-proprietary tool for serious transformations of PDF files, and as such it used to be available from the Cygwin package repository, but I can't find it anymore. ...
user avatar
  • 10.3k
2 votes
0 answers
72 views

Unattended PDF merge and print

My company is using an invoicing software that creates 3 ways invoice (original, duplicate and triplicate) as separate files which are sent to printer. We need our printer to staple them automatically ...
user avatar
0 votes
0 answers
841 views

Ghostscript - append merge pdf into single file

I need to merge multiple pdf's into single file which I'm doing like this: gs -q -sDEVICE=pdfwrite -sOutputFile=aio.pdf aio_single.pdf another.pdf and it is working, but it is extremely slow (~5 ...
user avatar
  • 111
1 vote
1 answer
105 views

Supressing duplex for single pages in PDF

I have several documents (PDF, source available), some of which have an odd number of pages. I'd like to merge them (no problem so far with pdftk) and make sure that each document begins on a new ...
user avatar
  • 878
0 votes
1 answer
371 views

How do I merge two PDF files and insert the same single page into another 744 times?

I saw this answer: https://superuser.com/a/598688/130929 But it was for files with the same number of pages. I have a PDF with 744 addresses and I have a single page letter for the contents which is ...
user avatar
  • 5,366
3 votes
1 answer
654 views

pkftk.jar executable with bash script pdftk current directory

In ubuntu-16.04 the command line program pdftk was dropped. I use pdftk every day, so I am working on using this PDFTK fork https://gitlab.com/marcvinyals/pdftk from the instructions found at https://...
user avatar
2 votes
0 answers
192 views

Can pdftk merge annotations from multiple files (same document)?

I have multiple versions of the same document, with different annotations (comments, highlights, etc.). For example, suppose I sent a PDF document to some colleagues and they sent it back with the ...
user avatar
  • 627
7 votes
1 answer
784 views

Multiple operations with pdftk

I am using pdftk to perform some operations on PDFs. Right now I am doing it like this: pdftk <files> OPERATION <options> output - | \ pdftk - <other files> OPERATION <options>...
user avatar
  • 2,054
0 votes
1 answer
658 views

Merging PDF pages to single page, alternative to pdftk stamp function

I am trying to add page numbers to a PDF bundle. Essentially the idea is to take 2 PDF pages, outputting one on top of the other, creating a single PDF page output as described in tutorial: ...
user avatar
3 votes
2 answers
12k views

How to convert PNG to PDF

I've see everywhere that a "convert" command works. But I'm using windows and convert does the following "In computing, convert is a command-line utility included in the Windows NT operating ...
user avatar
  • 131
3 votes
1 answer
2k views

Specify a list of files as input into pdftk

I have a list of files that I need to specify as input to pdftk so it will concatenate them in the order specified. I don't see an input file list as an option in the pdftk man page, but perhaps ...
user avatar
0 votes
3 answers
9k views

Double Sided Flash Cards from Excel Document

I have ~3,000 word list that includes multiple definitions and multiple example sentences for each word. It's in an Excel document arranged like this: Word Translation 1 Translation 2 ...
user avatar
0 votes
1 answer
942 views

How to insert blank page every seven pages

I need to insert a blank page every 7 pages of a document consists of about 737 pages. How can I do this with pdftk?
user avatar
3 votes
2 answers
1k views

PDFTK: pdfs that display with bookmark panel open

Is it possible, with pdftk, to render a bookmarked PDF that opens with bookmarks displaying? I've been able to set that as an option with various GUI tools over the years (Ipro+, PDFDocs, etc...) but ...
user avatar
1 vote
1 answer
361 views

Adjust the positioning of PDF content

Is there any way to adjust the positioning of PDF content? For example, suppose a PDF has the text "Hello World" written in the top left and is otherwise transparent, and I want to move this text 5 ...
user avatar
  • 111
2 votes
4 answers
4k views

How can I combine the first page of each pdf in a folder?

How can I combine the first page of each pdf in a folder? If possible, I'd like to do that using a command line application. Currently I'm using the PDFtk software using a command like this: pdftk *....
user avatar
  • 1,105
0 votes
1 answer
1k views

Cannot run qpdf; invalid password

I am trying to use qpdf to remove the password from a pdf file to allow me to use in in pdftk. I am running qpdf in windows from command line using the following command; C:\Users\myusername>"C:...
user avatar
  • 225
2 votes
0 answers
139 views

pdftk. Inserting a single page pdf ever other page

I have a pdf that can be any number of pages and each page is different. How can I insert a second pdf that is only 1 page in length into every other page of the first pdf. Because its only 1 page, ...
user avatar
  • 21
0 votes
0 answers
225 views

PDF Batch Process Edit Bookmark Properties - Acrobat Pro

I created bookmarks in pdf using pdftk. But all the bookmarks are set to zoom to fit. I want to edit the properties of all the bookmarks to zoom to width. I have acrobat pro. Please help.
user avatar
1 vote
2 answers
1k views

Merging PDF files with PDFTK

I have a directory with PDF files that looks like this: 2016_AAA_SomeRandomText1.pdf 2016_BBB_SomeRandomText1.pdf 2016_AAA_SomeRandomText2.pdf 2016_BBB_SomeRandomText2.pdf 2016_AAA_SomeRandomText3.pdf ...
user avatar
1 vote
1 answer
244 views

How to view PDF in Artbox?

I have a PDF, which by default it displays the pages in Trimbox/Bleedbox sizes. But if I "crop" something, clearly you can see that there is an Artbox outside. How can I set the default display to ...
user avatar
1 vote
1 answer
134 views

Read pdf with minimum white margin

I have a pdf file which originates from MS Word (*.docx). I want to read / print it out with minimum white margin. I have tried converting the pdf file back to *.docx. Although I can edit the white ...
user avatar
7 votes
1 answer
8k views

pdftk flatten loses fillable field data

I'm trying to work out a solution to flatten PDFs with already-filled out fields on a Linux command line. I was messing around with GhostScript at first, but I found that tended to convert all the ...
user avatar
3 votes
2 answers
2k views

both pdftk and qpdf fail at protecting my documents

From pdftk man page, I should be able to protect a pdf document from content copy, printing, snapshots with: pdftk 1.pdf output 1.128.pdf owner_pw foopass But it fails, I can do any of them ! I ...
user avatar
  • 655
1 vote
0 answers
630 views

remove pdf stamp that has been added by pdftk

Question: Can you remove a stamp added with pdftk, using Linux command line tools? Motivation for the question: I have tens of thousands of scanned pages, in hundreds of pdf files. I would like to ...
user avatar
  • 111
7 votes
1 answer
9k views

No output from pdftk

I am trying to add a background to a PDF with pdftk: $ pdftk ./sources/Skills.pdf background ./Background.pdf output test.pdf verbose Command Line Data is valid. Input PDF Filenames & Passwords ...
user avatar
  • 7,287
-1 votes
1 answer
170 views

How to add one specific page (PDF file) to a list of existing PDF files?

I have 400 different pdf files in one folder and need to add one specific page (1 other pdf file, page.pdf) automatically to all of these 400 files, always at the end. How can I do that?
user avatar
  • 151
9 votes
3 answers
11k views

Merge two pdf files side by side in command line

I have got two pdf files with same number of pages and want compare each page with the corresponding page in the other file. For this I would like to merge say page 1 of File1.pdf with page 1 of File2....
user avatar
  • 211
2 votes
3 answers
1k views

Combining multiple pdf fragments to one page - top aligned without margin

I have multiple small fragments as PDF file, depending on user input these fragments has to be combined to one page. pdfjam and/or pdfnup do this, and works. However, the default layout is according ...
user avatar
  • 21
-1 votes
1 answer
751 views

How do I open and use pdftk?

pdftk was installed using sudo apt-get install pdftk but how do I open and use this software? Please help me find it and open it. I have Lubuntu 14.0.
user avatar
3 votes
1 answer
3k views

ImageMagick: wrong size when converting PDF to JPG

I want to apply some improvements (change brightness, contrast, etc) to a pdf, to make it more readable, so I chose ImageMagick and pdftk. I used the following command to split the pdf into several ...
user avatar
1 vote
1 answer
2k views

Batch file to combine pdf files in alphabetical order

I want to create a batch file to combine selected pdf files in alphabetical order. Currently I have the following script: @echo off setlocal enabledelayedexpansion FOR %%A IN (%*) DO (set command=...
user avatar
  • 11
2 votes
1 answer
2k views

What is the maximum length of a PDF document password?

I would like to know what is the maximum length of a PDF document password. I want to know this, for all PDF document versions and encryption modes. For example 40bit, 128bit, 256bit etc.
user avatar
0 votes
1 answer
176 views

pdftk under Tomcat - permissions for generated report file

I have a server with Ubuntu 12.04 and I have a Servlet under tomcat that is used to split PDF files. When the file is uploaded to the Servlet, It opens an external process (using commons-exec) and ...
user avatar
1 vote
1 answer
5k views

Merge pdf and remove pages in one pass

I'd like to concatenate pdf documents without loosing any information (image resampling etc.). I only want to do lossless compressions, consolidate fonts etc. Before merging, I'd like to remove the ...
user avatar
  • 13
3 votes
1 answer
2k views

Creating a batch OR .bat file to linearize and merge PDFs using QPDF.exe

I am trying to create a batch OR .bat file that will linearize MULTIPLE PDF files. I already have a script I commandeered that uses PDFTK that sends PDFs to the 'sendto' folder where they are combined....
user avatar
1 vote
1 answer
4k views

Resize PDF pages and expand white background

What I Have I have a PDF containing a series of photos. Each photo occupies an entire A4-sized page. That is, each page of the PDF contains 1 photo, and there is no border/background/canvas showing ...
user avatar
  • 345