perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Kim <b...@coe.tamu.edu>
Subject RE: saving snapshot of the page
Date Mon, 18 Apr 2005 21:31:01 GMT

> With HTML::Embperl:
> [-
> $content = '';
> @err = ();
> # note: this will produce output based on the current escmode setting
> # You would want to check errors etc etc
> Execute({inputfile => 'blah',
> output => \$content,
> errors => \@err
> });
> # save to DB
> -]
> [-
> local $escmode=0;
> print OUT $content;
> -]
> Andrew O'Brien 

Thanks for the help. It worked great. Here's what I used.

  $escmode=0;
  Execute(
    {
    inputfile => "printable.epl",
    param => [$id, ...],
    output => \$out,
  });
  $sql=qq[insert into "History" (...) values (..., ?, ...)];
  $dbh->do($sql, undef, $out) or die $dbh->errstr;
...
  [+$out+]

Outputfile and output didn't work together in one Execute, but if I did
Execute twice (one with output and another with outputfile) it worked
fine.

I checked it because I wanted also to use the outputfile result as an
input to htmldoc to generate pdf. Pdf was generated OK. Unfortunately, the
stylesheets included in the page doesn't make it to the pdf file. I tested
by putting all stylesheet codes in the page (rather than including a css),
but it didn't make a difference.


Thanks.

Ben Kim
Database Developer/Systems Administrator
434E Harrington Tower / College of Education 
Texas A&M University





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message