[ic] Tag [create-pdf]

Marco Mescoli m.mescoli at omnibit.nu
Sat Mar 19 02:25:25 EST 2005

> > No rights problems on tmp dir ...
> > It seems that the usertag have not the input file.
> > Can you explain this behavior ?
> Try the usertag with an absolute path for the htmldoc binary and capture
> the return values of system:
> my $ret = system $cmd;
> ::logError("Return value is $ret");
> Bye
> Racke

Good suggestion Racke, some steps forward ... Now the only  way to get some
pdf is
to comment out the line "unlink  $outfile" from the user tag create pdf,
but the interchange page displayed by browser is blank ...
I beleive this is not the way that Mike have think this routine, but i
cannot understand how.
UserTag create-pdf Routine <<EOR
sub {
    my $infile = catfile($Vend::Cfg->{ScratchDir},
    my $outfile = catfile($Vend::Cfg->{ScratchDir},
    open PAGE, "> $infile"
    or die "Cannot create pagefile $infile: $!";
    for(@Vend::Output) {
        print PAGE $$_;
    close PAGE;
    my $cmd = "htmldoc --continuous -f $outfile $infile";
    #::logDebug("ready to run htmldoc command=$cmd");
    my $ret = system $cmd;
    logError("Return value is: $ret");
    if(-f $outfile) {
        $Tag->deliver( { type => 'application/pdf', file => $outfile });
    #   unlink $outfile;
    else {
        my $msg = errmsg("htmldoc failed to produce output with command:
%s", $cmd);
    unlink $infile;
Ciao Marco

More information about the interchange-users mailing list