Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pdftk]

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

0
votes
1answer
42 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 ...
0
votes
0answers
425 views

Using pdftk to batch merge files of similar names. Windows cmd

I simply have a similar task to do as discussed here, but with a slightly different file structure. I was hoping someone could help me out with modifying the script that was given in the answer to ...
0
votes
0answers
15 views

export to / create / tweak PDF: can you predefine a printing range?

Let's say you have a 20 page PDF document and your users will almost always need to print only one page of it. Can a PDF be tweaked so that at printing time, the "page range" is pre-set to the page(s)...
0
votes
0answers
54 views

How to produce PDF with text that copies as garbage

I often encounter PDFs, text from which can be copied, but when pasted into any other application turns into garbage, for example this pdf (Relevant discussion). It seems like a special font is ...
3
votes
1answer
155 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://...
1
vote
0answers
54 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 ...
4
votes
0answers
175 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
267 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: ...
0
votes
1answer
3k 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 ...
2
votes
1answer
551 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
4k 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
439 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?
2
votes
2answers
419 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
195 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 ...
1
vote
3answers
865 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
516 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
81 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
118 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.
0
votes
1answer
464 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 ...
1
vote
1answer
156 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
69 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 ...
2
votes
1answer
2k 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 ...
2
votes
2answers
601 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
408 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 ...
6
votes
1answer
6k 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
133 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?
5
votes
2answers
5k 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
643 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
562 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
913 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
1k 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
129 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
4k 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 ...
0
votes
0answers
756 views

remove image from pdf document

Is it is possible to remove a specific image from a 1 page document using pdftk? Have 1000+ documents in a directory and need a quick way to remove the same unwanted image from every document.
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
2k 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 ...
7
votes
2answers
4k 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
252 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
9
votes
5answers
7k 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
11k 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
876 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
7k 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 ...
3
votes
3answers
3k views

How can I append two PDFs that have links

My problem I have two PDFs which I would like to merge to one PDF. The first one was generated with LaTeX and has links to the chapters, the second one is a GUI-draft with links created with Balsamiq....
33
votes
10answers
26k views

Merge two PDF files containing even and odd pages of a book

I have two searchable PDF documents, say even.pdf and odd.pdf which contain even and odd pages of a book, respectively. I can decompile each PDF to separate files 001.pdf 002.pdf 003.pdf, et cetera....
3
votes
1answer
1k views

pdftk: Compressing a bunch of PDFs en masse/in batch while keeping the filenames?

I have a rather simple problem. I have a lot of PDFs that I want to compress, all grouped by college class. I don't have the time or energy to manually run the compress command when I know I can ...
1
vote
3answers
1k views

fit multiple pdf pages to one

Is it somehow possible to "zoom out" a multi-page PDF to fit all pages to one via command line (must work under Linux) e.g. I have a PDF generated with XSL:FO/FOP with a table (the red one in the ...
2
votes
1answer
130 views

Batch file to process the combining of 2 sets of pdf files together in a directory

I am looking for a script that can do the following: I have 500 pdf files with naming convention: SC####.pdf 500 pdf files with naming convention: AB####.pdf I want a batch file to check if there ...