Hi!
I’m trying to do some pdf parsing by invoking “pdftotext” from an action:
my ($rh, $wh);
my $pid = open2( $rh, $wh ,"pdftotext - -" );
print $wh decode_base64($attachment);
$wh->close();
while (<$rh>) {
# process
}
$rh->close();
This code works when invoked directly from a shell, but fails to produce any output when invoked as a Scrip Action.
Could this be related to apache? Or the way rt runs actions? Any clue?
Ok, by using open3 and RT::Logger I saw errors on stderr.
This was due to the fact that the attachment was already decoded from base64, after removing decode_base64() everything works.