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
7
votes
1 answer

Apk add pdftk unsatisfiable constraints

Can somebody explain to me why I get a unsatisfiable constraints: pdftk (missing): required by: world[pdftk] error when running apk update apk add pdftk in my alpine docker-image, although it seems to be included in alpine? Best regards
Nemo Grippa
  • 439
  • 1
  • 5
  • 11
7
votes
1 answer

How to concatenate multiple pdf as one, each input pdf starting on an even page?

DUPLICATE OF How can I merge PDF files (or PS if not possible) such that every file will begin in a odd page? I have a serie of documents, each one with an unpredictable number of pages. Say : a.pdf (1 page : A1) b.pdf (3 pages : B1, B2, B3) c.pdf…
Elvex
  • 656
  • 5
  • 22
7
votes
1 answer

pdftk fill_form utf8 problems

Possible Duplicate: Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters I am using pdftk to fill template pdf with data from fdf. Data has correct utf-8 characters, but when I use fill_form, resulting pdf file has formating errors. (I…
mitric
  • 91
  • 1
  • 8
7
votes
3 answers

Bulk template based pdf generation in PHP using pdftk

I am doing a bulk generation of pdf files based on templates and I ran into big performance issues pretty fast. My current scenario is as follows: get data to be filled from db create fdf based on single data row and pdf form write .fdf file to…
Naz
  • 5,104
  • 8
  • 39
  • 63
7
votes
1 answer

How do I determine programmatically if a PDF is searchable?

I have a CSV with a list of URLs with PDFs: Some of these PDFs are searchable. Some of these PDFS aren't searchable. I want to determine which PDFs are searchable from my list of PDFs. Is there an easy way to do this?
user1507889
  • 463
  • 8
  • 19
6
votes
1 answer

Filling PDF form with PDFTK (or php/javabridge) ignoring certain unicode chars

Possibly related question 1, Related question 2 What We're trying to accomplish: Use drupal webform submition data as a source to fill a PDF form and serve it to the user, flattened for printing. We're trying to deploy this on Drupal 6 and later on…
Putr
  • 969
  • 10
  • 22
6
votes
2 answers

Alternative `pdftk multistamp` to `pdftk` once it's no longer available?

I'm using pdftk multistamp on a server for adding custom page numbering, page headers and page footers to big (500-1200 pages) PDF files. I do this by counting number of pages in the input, creating suitable empty pages with page numbers, headers…
Mikko Rantalainen
  • 14,132
  • 10
  • 74
  • 112
6
votes
1 answer

How to set up pdftk or iText to work with Rails 3 on Heroku?

I'm trying to find a way to inject FDF file content into a fillable PDF file (provided by customer and not supposed to be 're-drawn' using Prawn or PDFKit), and I think I have to use either iText(with JRuby) or pdftk. Both of these libs work with…
Dominic
  • 341
  • 2
  • 5
  • 15
6
votes
1 answer

Merge FDF and PDF without PDFTK

Is there a way to merge FDF file and a PDF File to create a flat format of all the data and form into 1 pdf without using PDFTK? Any light shed upon this would be greatly appreciated.
Justin
  • 2,502
  • 7
  • 42
  • 77
6
votes
3 answers

Import PDF file into XeLaTeX gives "pdf_link_obj(): passed invalid object" error

I'm trying to import a PDF into a XeLaTeX using \includepdf{xyz.pdf}. The file xyz.pdf is a scan created by a Xerox 5755 machine, and PDF version 1.3. The error I get is: ** WARNING ** No valid name object found. ** WARNING ** Could not find…
Brian M. Hunt
  • 81,008
  • 74
  • 230
  • 343
6
votes
1 answer

PDFTK - and the ability to change the default view

I have been merging PDFs using PDFTK with great success, the pages that are used to generate the pdf are set to 'click to show one page at a time' (basically the whole of the first page is displayed when the pdf opens, based on the height of the…
Aborgrove
  • 288
  • 5
  • 16
6
votes
1 answer

Adding metadata to PDF via PHP

I need to augment a PDF with a custom metadata field on download in PHP (5.3). I have been looking at the pdftk library, but I can't get my head around how I would get PHP to interface with it on our (Ubuntu) web server. The deprecated PDFInfo…
JamieNewman
  • 917
  • 1
  • 12
  • 20
6
votes
4 answers

Executing "pdftk my-pdf-form.pdf dump_data_fields" shows nothing

I am using the tool pdftk, I have got a editable PDF and I saw in the documentation the arguments dump_data_fields should show me the fields of the form. I use this command (windows): pdftk my-pdf-form.pdf dump_data_fields I am using the pdftk…
dlopezgonzalez
  • 4,217
  • 5
  • 31
  • 42
6
votes
0 answers

Pdftk cyrillic characters encoding

When i flatten a pdf document using pdftk the cyrillic characters don't appear correctly. а о й gets converted to а о Ð I tried changing the encoding on the pdf , passing the data through utf8_decode() - that only worked for letters such as ä ø,…
6
votes
3 answers

Command line tool to mark PDF to open in Single Page view

Short Question : Is there a PDF command line/shell tool (for osx) which can set the necessary property(ies) on a PDF for it to be opened initially in "Single Page View" (fit to window) More Info I'm currently generating PDFs using WkhtmlToPdf and…
Richard
  • 440
  • 1
  • 6
  • 15