Questions tagged [pdftk]

A simple, GPL-licensed command-line tool for manipulating PDF documents.

Project homepage

Pdftk allows you to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris.

Pdftk can

  • Merge PDF Documents
  • Split PDF Pages into a New Document
  • Rotate PDF Pages or Documents
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
  • Apply a Background Watermark or a Foreground Stamp
  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
  • Update PDF Metadata
  • Attach Files to PDF Pages or the PDF Document
  • Unpack PDF Attachments
  • Burst a PDF Document into Single Pages
  • Uncompress and Re-Compress Page Streams
  • Repair Corrupted PDF (Where Possible)
510 questions
0
votes
1 answer

How to serve dynamic pdf in Django on mobile device

Using pdftk I generate some dynamic temporary pdf files, which then Django serves to the user. On a desktop, it works fine - the pdf file opens which then user can save, however on my android phone in all browsers (maybe the same on iOS but don't…
miki725
  • 27,207
  • 17
  • 105
  • 121
0
votes
2 answers

PHP force PDF download not working only for browser on Android

I use POST requests to transfer data that is needed to create the downloadable document on the fly. When the form is submitted, the $_POST array is passed to a function that returns the path of a created FDF file. The code: header('Content-Type:…
user1431775
-1
votes
1 answer

C# - Pdftk - How can i make it so that whenever a pdf has an odd number of pages, a blank page is added?

I want to merge many pdf to a single one with Pdftk. How can i make it so that whenever a pdf has an odd number of pages, a blank page is added? I need this function for a cmd tool which i need to write in c#. The PDF should be printed…
aljoscha
  • 11
  • 5
-1
votes
1 answer

Combining two pdfs with pdftk and the use of a loop

I have been working a project that involves combining the pages of two pdfs in a way that the pages from one pdf are the even pages of the final pdf and the pages of the second pdf are the odd pages of the final pdf, So for example say I have…
-1
votes
1 answer

Identify PDF files which have bookmarks

I have a batch of pdf files (most of them are dissertations) in a directory. Some of them have bookmarks in the pdf which helps me to jump to topics easily. Now, I want to bookmark the rest of them. It is there any script that can help me to tag or…
Dellu
  • 139
  • 1
  • 11
-1
votes
1 answer

How to send fillable pdf (filled with pdftk) via PHPMailer?

I have a form on a website that customers fill. When user filles the form and clicks submit data is sent to a pdf(invoice) I've already created and certain spots in pdf are filled with that data. I did this using PDFTK library: public function…
Aleksa
  • 1
  • 2
-1
votes
1 answer

PDFTK right click to encrypt

I need to get a certain part of the file name and use that as a variable in a batch file. Each file will have the following structure: "name_surname$code". My goal is to get all text after the $ sign. While being smacked on the fingers with good…
ben
  • 81
  • 8
-1
votes
1 answer

Reverse PDF imposition

I have an imposed document: there are 4 × n A4 pages on the n sheets. I put them into a roller image scanner and receive one 2 × n paged PDF document (A3). If, say, n = 3, then I've got the following sequence of A3 pages in my PDF: page one: page…
Yury Kirienko
  • 1,810
  • 1
  • 22
  • 32
-1
votes
1 answer

Batch-Script variable access

I am writing a little Batch skript for deleting first page of every pdf file in the directory and subdirectories. The problem is, that I don't know how to use the filename variable. setlocal enabledelayedexpansion pause FOR /R %%i IN…
-1
votes
1 answer

php-pdftk Mutlple Files

I am using php-pdftk to generate pdf files. I am attempting to create multiple pdf's, but this only generates 1 file. Here is an example of what I am doing. $pdf = new Pdf( 'file1.pdf' ); $pdf->send('test1.pdf'); $pdf2 = new Pdf( file2.pdf'…
Juan Rangel
  • 1,763
  • 1
  • 18
  • 34
-1
votes
3 answers

php exec command not running?

I have a PHP file Executing a shell command for a tool called PDFTK. The command works fine when I run it directly from the command line but through the PHP script it self, it does not and doesn't throw an error. The command i am running…
SBB
  • 8,560
  • 30
  • 108
  • 223
-1
votes
1 answer

can't assign variable name to filename in pdftk

I am trying to run the following command in a php script and for some reason it doesn't work, and i don't get any errors either: shell_exec("pdftk Invoice.pdf fill_form invoice.fdf output" . $_POST["Job"] . ".pdf flatten"); But if i run the same…
Brad Hazelnut
  • 1,603
  • 5
  • 21
  • 33
-2
votes
1 answer

Loop in .bat file

I must rename more hundred files, they are numbered on the left, from 01 to 100, on the right side from G3002185 to G3002285 i use this script rename 01.pdf G3002185.pdf rename 02.pdf G3002186.pdf rename 03.pdf G3002187.pdf rename 04.pdf…
-2
votes
1 answer

pdftk in php not working

here is the code.... it is not able to merge two pdf files ...can anyone find what the problem is in the code... thanks for ur time....
user813995
  • 7
  • 1
  • 4
-8
votes
1 answer

How to transfer a user's signature from a webform to a pdf template?

I have a web form that uses an HTML5 canvas element to allow users to sign their name. When the form is submitted, all field values and the base64 string (e.g. "data:image/png;base64,blahblahetc") containing the user's signature are processed and…
mickmackusa
  • 43,625
  • 12
  • 83
  • 136
1 2 3
33
34