#!/usr/bin/perl use strict; use warnings; print <<'.'; ATI PDF . my $pages = do $ARGV[0]; print ''; my $cur_text; foreach my $page (@$pages) { $page->{num} < 8 and next; print qq(\n); my $cur_table; my $cur_col; foreach my $text (@{$page->{text}}) { defined $text->{table} or next; $cur_table = $text->{table}; if ($text->{col} eq "heading") { print qq(\n); next; } if ($text->{col} == 0 and (not defined $cur_col or $cur_col != 0)) { defined $cur_col and print "\n"; print "\n"; } } print "
page $page->{num}
$text->{text}
"; $cur_text = ''; } elsif (defined $cur_col) { if ($text->{col} == $cur_col) { print "
\n"; if (length $cur_text > 10 and $cur_col == 1) { die "error on page $page->{num}"; } } if ($text->{col} != 0 and $cur_col != $text->{col}) { print "
"; $cur_text = ''; } } $text->{text} =~ s/&/&/g; print $text->{text}; $cur_text .= $text->{text}; $cur_col = $text->{col}; } if (defined $cur_table) { print "
"; print "";