ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* pdftops
@ 2000-09-21 11:00 Hans Hagen
  2000-09-21 14:38 ` pdftops Ed L Cashin
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Hagen @ 2000-09-21 11:00 UTC (permalink / raw)


Hi, 

the perl line: 

  system("pdftops") ; 

does not work any longer with the latest perl and pdftops. It does work
when the program is on the same path, but not otherwise. This is strange,
since pdfetex in the same binpath as pdftops does work. Did they change perl? 

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pdftops
  2000-09-21 11:00 pdftops Hans Hagen
@ 2000-09-21 14:38 ` Ed L Cashin
  0 siblings, 0 replies; 2+ messages in thread
From: Ed L Cashin @ 2000-09-21 14:38 UTC (permalink / raw)
  Cc: ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> Hi, 
> 
> the perl line: 
> 
>   system("pdftops") ; 
>
> does not work any longer with the latest perl and pdftops. It does
> work when the program is on the same path, but not otherwise. This
> is strange, since pdfetex in the same binpath as pdftops does
> work. Did they change perl?

Yes, the latest version of perl is very different.  Version 5.6 has
some big differences, including new features that are incompatible
with the old perl 5 (e.g., now "use vars" is obsolete because of the
introduction of "our" variables). 

But I can't think of why the new perl would make that simple system
call break.  Looking at the entry for "system" in the perlfunc
manpage, I see ...

       Beginning with v5.6.0, Perl will attempt to flush all
       files opened for output before any operation that may
       do a fork, but this may not be supported on some
       platforms (see the perlport manpage).  To be safe, you
       may need to set `$|' ($AUTOFLUSH in English) or call
       the `autoflush()' method of `IO::Handle' on any open
       handles.

But I don't know if that's relevant.  Maybe try some error checking:

     { 
        #-----------this command makes a log file on UNIX-type OS
        my $cmd  = "pdftops foo bar 1> /tmp/test.log 2>&1";
        my $err  = system($cmd);
        if ($err == -1) {
           die "Error: could not start pdftops: $!";
        } elsif ($err) {
           $err  /= 256;        # find real exit status
           die "Error: pdftops returned error status: $err";
        }
        print "Oh, happy day!\n";
     }  

-- 
--Ed Cashin                     PGP public key:
  ecashin@coe.uga.edu           http://www.coe.uga.edu/~ecashin/pgp/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-09-21 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-21 11:00 pdftops Hans Hagen
2000-09-21 14:38 ` pdftops Ed L Cashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).