/usr/share/perl5/auto/PDF/Reuse/AcroFormsEtc.al is in libpdf-reuse-perl 0.35-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | # NOTE: Derived from blib/lib/PDF/Reuse.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package PDF::Reuse;
#line 5366 "blib/lib/PDF/Reuse.pm (autosplit into blib/lib/auto/PDF/Reuse/AcroFormsEtc.al)"
##############################################################
# Interaktiva funktioner knutna till ett formulär återskapas
##############################################################
sub AcroFormsEtc
{ my ($infil, $sidnr) = @_;
my ($Names, $AARoot, $AAPage, $AcroForm);
@skapa = ();
my ($res, $corr, $nyDel1, @objData, $del1, $del2, $utrad);
my $fSource = $infil . '_' . $sidnr;
$behandlad{$infil}->{old} = {}
unless (defined $behandlad{$infil}->{old});
$processed{$infil}->{oldObject} = {}
unless (defined $processed{$infil}->{oldObject});
$processed{$infil}->{unZipped} = {}
unless (defined $processed{$infil}->{unZipped});
*old = $behandlad{$infil}->{old};
*oldObject = $processed{$infil}->{oldObject};
*unZipped = $processed{$infil}->{unZipped};
my @stati = stat($infil);
if ($form{$fSource}[fID] != $stati[9])
{ print "$stati[9] ne $form{$fSource}[fID]\n";
errLog("Modification time for $fSource has changed, aborting");
}
open (INFIL, "<$infil") || errLog("The file $infil couldn't be opened, aborting $!");
binmode INFIL;
my $fdSidnr = $intAct{$fSource}[iSTARTSIDA];
$old{$fdSidnr} = $sidObjNr;
if (($intAct{$fSource}[iNAMES]) ||(scalar @jsfiler) || (scalar @inits) || (scalar %fields))
{ $Names = behandlaNames($intAct{$fSource}[iNAMES], $fSource);
}
##################################
# Referenser behandlas och skrivs
##################################
if (defined $intAct{$fSource}[iACROFORM])
{ $AcroForm = $intAct{$fSource}[iACROFORM];
$AcroForm =~ s/\b(\d+)\s{1,2}\d+\s{1,2}R\b/xform() . ' 0 R'/oegs;
}
if (defined $intAct{$fSource}[iAAROOT])
{ $AARoot = $intAct{$fSource}[iAAROOT];
$AARoot =~ s/\b(\d+)\s{1,2}\d+\s{1,2}R\b/xform() . ' 0 R'/oegs;
}
if (defined $intAct{$fSource}[iAAPAGE])
{ $AAPage = $intAct{$fSource}[iAAPAGE];
$AAPage =~ s/\b(\d+)\s{1,2}\d+\s{1,2}R\b/xform() . ' 0 R'/oegs;
}
if (defined $intAct{$fSource}[iANNOTS])
{ for (@{$intAct{$fSource}[iANNOTS]})
{ push @annots, quickxform($_);
}
}
##################################
# Skriv ut underordnade objekt
##################################
while (scalar @skapa)
{ my @process = @skapa;
@skapa = ();
for (@process)
{ my $gammal = $$_[0];
my $ny = $$_[1];
my $oD = \@{$intAct{$fSource}[0]->{$gammal}};
@objData = @{$$oD[oNR]};
if (defined $$oD[oSTREAMP])
{ $res = sysseek INFIL, ($objData[0] + $$oD[oPOS]), 0;
$corr = sysread INFIL, $del1, ($$oD[oSTREAMP] - $$oD[oPOS]) ;
if (defined $$oD[oKIDS])
{ $del1 =~ s/\b(\d+)\s{1,2}\d+\s{1,2}R\b/xform() . ' 0 R'/oegs;
}
$res = sysread INFIL, $del2, ($objData[1] - $corr);
$utrad = "$ny 0 obj\n<<" . $del1 . $del2;
}
else
{ $del1 = getObject($gammal);
$del1 = substr($del1, $$oD[oPOS]);
if (defined $$oD[oKIDS])
{ $del1 =~ s/\b(\d+)\s{1,2}\d+\s{1,2}R\b/xform() . ' 0 R'/oegs;
}
$utrad = "$ny 0 obj " . $del1;
}
$objekt[$ny] = $pos;
$pos += syswrite UTFIL, $utrad;
}
}
close INFIL;
return ($Names, $AARoot, $AAPage, $AcroForm);
}
# end of PDF::Reuse::AcroFormsEtc
1;
|