On Sun, 04 Dec 2005 22:26:48 -0700
Joseph <[EMAIL PROTECTED]> wrote:

> > 
> > I think I have tracked down the code for printing to the file SL/Form.pm
> > (I tracked it by grepping the source for outr likely commands, dvips,
> > pdflatex etc.)
> > 
> > Unfortunately I am not a perl guru, but there are clearly differences in
> > processing between ps output and pdf output. For example there is a
> > passage that shows that if the format is ps the following is executed:
> > 
> > latex --interaction=nonstopmode
> > dvips  -o -q
> > 
> 
> dvips -o -q
> -o means:  The output will be sent to file name If no file name is given, the 
> default name is  file.ps
> -q means quite mode.
> 
> Here is the part that sends file to a printer, can any perl guru help us
> out???

No, I don't think it sends anything to the printer. It is one stage of
the conversion process - to either pdf or ps. It is the bit I
identified in my last message (quoted above). But it doesn't actually
send it to the printer as far as i can see.



> How it converts to postscript file and which program is it using.
> 
> # Convert the tex file to postscript
>   if ($self->{format} =~ /(postscript|pdf)/) {
> 
>     use Cwd;
>     $self->{cwd} = cwd();
>     chdir("$userspath") or $self->error($self->cleanup."chdir : $!");
> 
>     $self->{tmpfile} =~ s/$userspath\///g;
> 
>     # DS. added screen and email option in addition to printer
>     # screen
>     if ($self->{format} eq 'postscript') {
>       system("latex --interaction=nonstopmode $self->{tmpfile} >
> $self->{tmpfile}.err");
>       $self->error($self->cleanup) if ($?);
> 
>       $self->{tmpfile} =~ s/tex$/dvi/;
> 
>       system("dvips $self->{tmpfile} -o -q > /dev/null");
>       $self->error($self->cleanup."dvips : $!") if ($?);
>       $self->{tmpfile} =~ s/dvi$/ps/;
>     }
>     if ($self->{format} eq 'pdf') {
>       system("pdflatex --interaction=nonstopmode $self->{tmpfile} >
> $self->{tmpfile}.err");
>       $self->error($self->cleanup) if ($?);
>       $self->{tmpfile} =~ s/tex$/pdf/;
>     }
> 
> -- 
> #Joseph
> -- 
> gentoo-user@gentoo.org mailing list
> 
-- 
gentoo-user@gentoo.org mailing list

Reply via email to