Questions tagged [pdftk]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
24 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 ...
1
vote
1answer
51 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 ...
1
vote
0answers
32 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.
0
votes
1answer
74 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 ...
0
votes
0answers
21 views

pdftk merge from folder

is it possible for pdftk to merge PDF's from one folder with another PDF from another folder but taking into account that it has to do this with one file after another? Example: PDF1 from folder A ...
2
votes
1answer
388 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. ...
2
votes
0answers
58 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 ...
0
votes
0answers
528 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 ...
1
vote
1answer
71 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 ...
0
votes
1answer
285 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 ...
3
votes
1answer
518 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://...
2
votes
0answers
160 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 ...
7
votes
1answer
551 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>...
0
votes
1answer
522 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: ...
3
votes
2answers
10k 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 ...
3
votes
1answer
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 ...
0
votes
3answers
8k 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 ...
0
votes
1answer
820 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?
3
votes
2answers
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 ...
1
vote
1answer
321 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 ...
2
votes
4answers
3k 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 *....
0
votes
1answer
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:...
2
votes
0answers
136 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, ...
0
votes
0answers
200 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.
1
vote
2answers
885 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 ...
1
vote
1answer
211 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 ...
1
vote
1answer
95 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 ...
4
votes
1answer
6k 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 ...
3
votes
2answers
1k 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 ...
1
vote
0answers
576 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 ...
7
votes
1answer
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 ...
-1
votes
1answer
164 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?
9
votes
3answers
9k 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....
2
votes
2answers
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 ...
-1
votes
1answer
715 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.
3
votes
1answer
2k 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 ...
1
vote
1answer
1k 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=...
2
votes
1answer
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.
0
votes
1answer
169 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 ...
1
vote
1answer
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 ...
3
votes
1answer
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....
1
vote
1answer
3k 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 ...
15
votes
3answers
8k views

Remove text from pdf

I have a pdf file with some text on each page which I would like to remove. The text is matched by a regex and I think it comes in one block of the pdf. I have used pdfedit to select and delete the ...
1
vote
1answer
2k views

PDFTK extract all pages from all pdf's output

I'm trying to extract all pages of several pdf's at the same time. Now it does work with: for %%I in (*.pdf) do "pdftk.exe" "%%I" burst But I don't get all the pages, because for every new document ...
2
votes
4answers
355 views

How create single pdfs out of one automatically? [duplicate]

I have a pdf file containing multiple pages. I could use a script that copies every single page out of this file into a new file. E.g. 40 pages in one file in, out: 40 files each 1 different page
10
votes
6answers
11k views

How do I duplicate pages within PDF files automatically?

I have a lot of PDF files with 1 to 4 pages each. I need a solution which automatically generates a new file for each of these files. The new files should contain the content of the original files ...
5
votes
2answers
14k views

Remove PDF margins and print 2 pages per side

I print out a lot of pdf articles, and I'd like to use less paper by printing 2 pages per side. But due to the large margins---both from the original pdf file and added by the printing process---the ...
4
votes
2answers
2k views

unix tools to merge pdf [duplicate]

I'm looking for an alternate to ghostscript to merge pdf tools. We generally have print jobs containing more than 3000 documents, which are to be merged into a pdf. Ghostscript does this whole ...
4
votes
0answers
1k views

How to extract all info on PDF bookmarks using GhostScript?

Is there a method of dumping all info on the bookmarks of a PDF using GhostScript? With PDFtk I could use pdftk in.pdf dump_data, but is it possible to do it with GS? I have a PDF with bookmarks ...
5
votes
1answer
9k views

How can I stamp every page of a pdf except the first one?

I have two PDF files; one is a document and the other is a single page containing a graphic. So far I have been using pdftk to stamp the graphic onto the document like so: pdftk document.pdf stamp ...