Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Trung Lê
committed
Jul 10, 2012
0 parents
commit 2e0f4bb
Showing
6 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rubygems' | ||
require 'nguyen' | ||
|
||
pdftk = Nguyen::PdftkWrapper.new('/usr/local/bin/pdftk') | ||
|
||
# Extract field names from file | ||
field_names = pdftk.get_field_names('sample.pdf') | ||
|
||
puts field_names.inspect |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require 'rubygems' | ||
require 'nguyen' | ||
|
||
pdftk = Nguyen::PdftkWrapper.new('/usr/local/bin/pdftk') | ||
xfdf = Nguyen::Xfdf.new(:given_name => 'Trung', :surname => 'Le') | ||
pdftk.fill_form('sample.pdf', 'populated.pdf', xfdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pdftk sample.pdf fill_form sample.xfdf output populated.pdf |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"> | ||
<fields> | ||
<field name="given_name"> | ||
<value>Trung</value> | ||
</field> | ||
<field name="surname"> | ||
<value>Le</value> | ||
</field> | ||
</fields> | ||
</xfdf> |