#!/usr/bin/perl
# Read from the standard input
@text=<STDIN>;
$size=@text;
# Count the number of "showpage"
$count=0;
for($i=0;$i<=$size;$i++){if($text[$i] =~ /showpage/){$count++;}}
# Discard the last line that contain "showpage"
$num=1;
for($i=0;$i<=$size;$i++){
if($text[$i] =~ /showpage/){
if($num!=$count){$num++;}
else{$text[$i]=~s/showpage//g;}
}
print $text[$i];
}
3) Crear un script pdf con el siguietne contenido:
#!/bin/bash
/bin/echo " "
/bin/echo "showpage"
/usr/bin/gs -q -sPAPERSIZE=a4 -dBATCH -dNOPAUSE -r600x800
-sDEVICE=pswrite -sOutputFile=- $1 | /usr/local/faxscripts/filter.pl
4) Reiniciar hylafax y enviar un correo con un pdf adjunto.
Hice todo esto y me llega el correo al fax pero el pdf que mando adjunto no me llega.
Alguien sabría decirme por qué o que estoy haciendo mal?
Muchas gracias y perdon por un correo tan grande.
|