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

PDFTK want to transfer to another domain

I am working on a project which was developed by another developer Now client wants me to move it from current linux based server to new windows based server it is developed in cakephp and PDFTK is used to fill pdf files dynamically. I am trying to…
user3459498
  • 83
  • 1
  • 1
  • 8
0
votes
1 answer

PHP passthru throwing error

I am using an application on my windows server called PDFtK which generates pdfs and you can merge data into them etc. I am trying to get passthru to work so I can just output the pdf to the browser without saving anything to the folder. This works…
SBB
  • 8,560
  • 30
  • 108
  • 223
0
votes
1 answer

pdftk watermark above page

I'm using pdftk to fill a pdf form with an xfdf file. Once this is done I use another pdf (containing a big red "SPECIMEN") as a watermark with the following command : shell_exec(SOURCE_PDF stamp WATERMARK_PDF output - flatten); The result is good,…
FLX
  • 2,626
  • 4
  • 26
  • 57
0
votes
1 answer

Can text in a PDF be converted to an image, rendered as custom font?

Some facts: I have a licensed font that cannot be embedded in the PDF I have created. The only text in the PDF is found in editable form fields. These fields' 'font' property is set to the licensed font. I am programmatically filling in these form…
deefour
  • 34,974
  • 7
  • 97
  • 90
0
votes
1 answer

php passing pdf content to an iframe using pdftk

I am generating a pdf using pdftk into an iframe with: However the browser (chrome) reports: "The file was damaged and could not be repaired" What am…
dazzler77
  • 33
  • 1
  • 5
0
votes
4 answers

terminal command not working in c# progra

I call a console program in a c# application but it's not working. I'm trying to call pdf toolkit VIA c#. When I run pdftk using command prompt, the output file (new.pdf) is created. When c# calls pdftk it doesn't error, but it doesn't work. Am I…
Frantumn
  • 1,725
  • 7
  • 36
  • 61
0
votes
1 answer

Get full error from PDFTK when using PHP exec

I'm using PHP exec() in a script to merge PDF files with PDFTK. From PHP docs: exec function says the second argument, if provided, will list each line from the console output. All I get is an empty array though. Example of code being…
Corie Slate
  • 616
  • 9
  • 19
0
votes
0 answers

Prepopulating PDF forms in PHP on the server

I am currently creating a site where the user would fill out a form and upon clicking submit button. The data entered by the user will both be sent to a database and used to fill-out the pdf version of the form. This pdf version of the form will…
0
votes
1 answer

Output list of pdf files as one pdf using pdftk bash script

I have a bash script containing a list of PDF files. The printer output is tailored by commenting/ uncommenting file requirement (see example script below). I wish to add to this so I can choose to print all selected files to a single pdf using …
Kes
  • 285
  • 2
  • 17
0
votes
1 answer

Windows batch script to find largest PDF file in subfolders and print with path in footer using Ghostscript and `pdftk`

I have a large number of directories, and there are a lot of PDF files in them. I have to print the largest PDF file in each subdirectories with the path in the footer. I have searched a lot on the internet, and have found this article. Based on it,…
user2511599
  • 796
  • 1
  • 13
  • 38
0
votes
1 answer

merging pdf's with duplicate form field names

I created a PDF in Word / Adobe Acrobat that has two identically named form field names. That PDF can be found here: http://www.frostjedi.com/terra/test.pdf When I open that PDF with Google Chrome I can edit those fields as I see fit. However, when…
neubert
  • 15,947
  • 24
  • 120
  • 212
0
votes
0 answers

Converting pdf form data to txt through pdftk

I have uploaded pdftk in the webmin server and using following code: form-fields.txt"); ?> Unfortunately I am not getting any value in txt file. I cannot realize where I am making mistake. On…
0
votes
1 answer

How to get the format category (datatype) of a text field in a pdf with pdftk?

I have a Linux web server and am creating a php application that works with pdf files. Current I am using pdftk to read all the field names and field types of pdf's that are uploaded to my server. Everything is working great but the issue I am…
JoBaxter
  • 710
  • 2
  • 12
  • 23
0
votes
1 answer

Parsing pdf form using PHP or JavaScript to get field position

How can I parse Pdf file with form to get fields position and page # of it on my web server? For example, there are some pdf with structure like this: <> endobj 19 0…
Footniko
  • 2,682
  • 2
  • 27
  • 36
0
votes
1 answer

Flatten a PDF with PHP (PDFTK)

I am using PDFTK to flatten a PDF with PHP. Problem is that all special characters (É,è,à, etc.) disappear once flattened. Tried UTF-8, unicode chars, htmlentities, etc., it's all the same as a result. Therefore, I would like to solve PDFTK issue OR…
guylabbe.ca
  • 871
  • 2
  • 11
  • 21