Questions tagged [pdftk]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Split pdf into separate files based on keywords

I work in an organization with a Purchasing dept. that processes a lot of POs. When they "print" a PO job to pdf, the resulting pdf can have pages for one or more Purchase Orders. For ...
reebo's user avatar
  • 1
3 votes
1 answer
116 views

How to convert a PDF with one long page into a PDF with mutiple A4 pages?

I have long PDFs with one page of very large height. I want to take each of these PDFs and generate on the Linux/macOS command line a new PDF file from it that is A4-paginated. I tried using qpdf to ...
halloleo's user avatar
  • 385
-1 votes
1 answer
1k views

Merge files starting with the same filename similarity

I need to merge several PDF files that are located in one folder (PDFsource). I have these 2 folders: PDFsourcePDFfinals I have multiple PDF files in one folder (PDFsource) with different file names....
Elizardo MC's user avatar
1 vote
1 answer
414 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 ...
smts's user avatar
  • 113
2 votes
1 answer
602 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?
bridgemnc's user avatar
0 votes
2 answers
663 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 ...
Coucout's user avatar
  • 143
0 votes
0 answers
325 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 ...
lalka's user avatar
  • 1
1 vote
3 answers
739 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 ...
ASD's user avatar
  • 99
1 vote
3 answers
902 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 ...
ASD's user avatar
  • 99
0 votes
3 answers
2k 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 ...
Juno's user avatar
  • 11
0 votes
1 answer
126 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 ...
OneFineAdmin's user avatar
1 vote
0 answers
884 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 ...
tommydog35's user avatar
1 vote
1 answer
527 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 ...
Asad Ali Hussaini's user avatar
1 vote
0 answers
164 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.
hyiltiz's user avatar
  • 468
0 votes
1 answer
541 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 ...
Kelsey Ciarrocca's user avatar
6 votes
1 answer
1k 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. ...
Hashim Aziz's user avatar
  • 12.7k
2 votes
0 answers
91 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 ...
SkilledNoob's user avatar
1 vote
0 answers
2k 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 ...
breq's user avatar
  • 121
1 vote
1 answer
159 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 ...
Jasper's user avatar
  • 908
0 votes
1 answer
900 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 ...
Chloe's user avatar
  • 5,946
3 votes
1 answer
772 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://...
Dan Hunt's user avatar
3 votes
0 answers
306 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 ...
a06e's user avatar
  • 667
7 votes
1 answer
1k 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>...
masgo's user avatar
  • 2,244
0 votes
1 answer
975 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: ...
jeffrico el exotico's user avatar
4 votes
2 answers
18k 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 ...
digit's user avatar
  • 141
3 votes
1 answer
4k 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 ...
Jeffrey Bauer's user avatar
0 votes
3 answers
11k 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 ...
Programming_Learner_DK's user avatar
0 votes
1 answer
1k 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?
Emanuele Ceccarelli's user avatar
3 votes
2 answers
2k 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 ...
Matt Murphy's user avatar
1 vote
1 answer
536 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 ...
Kyle's user avatar
  • 111
2 votes
4 answers
6k 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 *....
Jack's user avatar
  • 1,165
0 votes
1 answer
2k 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:...
acolls_badger's user avatar
2 votes
0 answers
149 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, ...
jamieB's user avatar
  • 21
0 votes
0 answers
252 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.
vel2013's 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 ...
Ramin Melikov's user avatar
1 vote
1 answer
307 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 ...
Chen Stats Yu's user avatar
1 vote
1 answer
189 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 ...
Rondey Lau's user avatar
7 votes
1 answer
11k 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 ...
user2752467's 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 ...
lalebarde's user avatar
  • 725
1 vote
0 answers
735 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 ...
Jakob's user avatar
  • 111
7 votes
2 answers
10k 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 ...
Matteo's user avatar
  • 7,847
-1 votes
1 answer
297 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?
Marc's user avatar
  • 181
9 votes
4 answers
14k 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....
nnn's user avatar
  • 211
4 votes
3 answers
2k 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 ...
Rufinus's user avatar
  • 41
-1 votes
1 answer
812 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.
Mohammad Nasr's 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 ...
supergiox's 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=...
Ronald's 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.
alexandertr's user avatar
0 votes
1 answer
190 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
2 votes
1 answer
6k 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 ...
Dan's user avatar
  • 23