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

Installing Pdftk on Linux server

Ihave been using pdftk.exe in my windows local machine to play with some pdf and is working fine. I want to upload it to my server which is Linux. On searching i found out that i have to install pdftk on the server itself as a compiled package for…
Andromeda
  • 12,659
  • 20
  • 77
  • 103
0
votes
1 answer

How can I use pdfk fill_form without writing to a temp file

I am trying to populate a pdf report with data from my mysql database. It works fine on my local machine but when I upload it to www.000webhost.com, the pdf document is not generated. I know the document writes a temp file to my folder every time I…
user2635901
  • 203
  • 2
  • 12
0
votes
2 answers

Flask - send_from_directory returns old file

When I fill and submit pdf form, send_from_directory returns the old file. I use pdftk to push fdf to pdf and flatten, but if I give the same filename as output with the old one, Flask shows the old file. Why isn't it overwritten by the new one?…
hyhr
  • 91
  • 1
  • 3
0
votes
0 answers

Sending data from an iframe with an interactive pdf to a php

I have an that displays an interactive pdf form. How do I create a button to get data from the pdf document. Need help please, been on this the whole day. Here's the php file that supposed to get the pdf data if(isset($_POST) && is_array($_POST) &&…
Daniel
  • 598
  • 1
  • 6
  • 23
0
votes
1 answer

PDFTK with PHP exec() fails using Amazon EC2 Windows Server IIS7

I'm using PDFTK to merge some PDFs on my Amazon EC2 instance running Windows Server and IIS7. When I try running PDFTK using PHP exec(), it does not work. For example: I can get…
user1855093
  • 373
  • 1
  • 2
  • 14
0
votes
2 answers

With PHP, how can I check if a PDF file has errors

I have a DB system built in PHP/MySql. I'm fairly new at this. The system allows the user to upload an invoice. Others give permission to pay the invoice. The accounting person uploads the check. After check is uploaded, it generates a PDF as a…
Curtis Fuller
  • 115
  • 1
  • 2
  • 10
0
votes
1 answer

Ghoscript /cropbox not printing correctly in linux

I'm using the Domestic shipping label api in usps to generate domestic shipping labels in pdf format. I managed to crop the top section of the pdf file which is the label needed by the usps and Ignored the bottom section which is the receipt which…
demic0de
  • 1,313
  • 1
  • 15
  • 30
0
votes
2 answers

Using PDFtk on a shared server

I'm looking into using PDFtk, but I have several questions that I'm just going to bundle together. (Let me know if they should be asked separately.) How would I install it on my shared web server? I use WebHostingHub, and their servers run…
vaindil
  • 7,536
  • 21
  • 68
  • 127
0
votes
0 answers

Using Python, how do I write FDF data to a secured PDF without knowing password?

First, I am trying to use Python to dynamically enter data into a secured PDF file, that I downloaded from a government source. I DO NOT have the password to unprotect them, but can open them with a PDF reader and enter data. I have tried using…
Furbeenator
  • 8,106
  • 4
  • 46
  • 54
0
votes
1 answer

Timed file encryption with pdftk

I know that I can "encrypt" a pdf file using pdftk and the following command: pdftk mydoc.pdf output mydoc.128.pdf owner_pw foopass. This I find disables printing. There are other options available that allow for low quality printing etc. However,…
dearN
  • 1,256
  • 4
  • 19
  • 40
0
votes
1 answer

Unhandled Java Exception while pdftk stamp

I'm trying to stamp a seal on a pdf with pdftk. I run: pdftk original.pdf stamp seal.pdf output sealed.pdf But it gets this just with a specific pdf: Unhandled Java Exception: gnu.xml.dom.ls.DomLSException: unbound element prefix: "xmp" at…
josebailo
  • 138
  • 1
  • 7
0
votes
2 answers

Ruby/Rails: pass arguments to command line application from rake task

How do you pass arguments from within a rake task and execute a command-line application from Ruby/Rails? Specifically I'm trying to use pdftk (I can't find a comparable gem) to split some PDFs into individual pages. Args I'd like to pass are…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
0
votes
1 answer

Ruby/Rails: Traverse folders and parse metadata to seed DB

I have a bunch of documents that I'd like to index in a Rails application. I'd like to use a rake task of sorts to comb a directory hierarchy looking for files and capturing the metadata from those files to index in Rails. I'm not really sure how to…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
0
votes
1 answer

Running pdftk on a shared file server

I have pdftk installed on a shared file server, and it works fine from the server itself. Is it possible to run pdftk from another computer that has access to the file server, but doesn't have pdftk installed itself? Any help would be much…
Dave
  • 25
  • 2
  • 6
0
votes
0 answers

Security of PHP exec() with pdftk utility

I'm interested to use pdftk (the pdft toolkit) by calling it from a PHP script. I intend to use the exec() function for this. The command would follow this format: pdftk [form_file] fill_form [data_file] output [output_file] flatten This command…
Kyle
  • 2,822
  • 2
  • 19
  • 24
1 2 3
33
34