我用Adobe LiveCycle Designer创建了一个PDF表单.我现在正努力在PDF填写后以编程方式从PDF中提取数据.
我尝试使用poppler(qt4绑定,但我想这没关系),但显然poppler无法处理XFA表单.虽然evince和okular能够显示表单......
据我了解,PDF包含一个XDP,而XDP又包含XFA表单.我的问题是,如何从PDF中提取数据?
如果有库,c ++,java,python或PHP是我的选择.
我试图在xdp文件的末尾附加时间戳.我在用 XML :: Twig.在运行脚本时,timestamp(<testing>4619314911532861</testing>)会在末尾添加,但输出将在STDOUT上而不是testdata.xdp.我错过了什么?
码:
#!/usr/bin/perl
use strict;
use warnings;
use XML::Twig;
my $twig=XML::Twig->new(pretty_print => 'indented');
my $file = 'testdata.xdp';
$twig->parsefile_inplace($file, '.bak');
my $root= $twig->root;
my @children= $root->children;
foreach my $child (@children){
my $eblg= new XML::Twig::Elt( 'testing', localtime);
$eblg->paste( 'last_child', $child);
}
$twig->flush;
Run Code Online (Sandbox Code Playgroud)