render pdf files using ghostscript to pbm
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 14 Aug 2010 12:49:40 +0000 (14:49 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 14 Aug 2010 12:49:40 +0000 (14:49 +0200)
inkscape-render.pl

index b8e7360..12af5f5 100755 (executable)
@@ -68,6 +68,13 @@ print $inkscape "$out.svg --export-png $out.png --export-dpi 300\n";
 
 close($inkscape);
 
 
 close($inkscape);
 
+foreach my $pdf ( glob "$out*.pdf" ) {
+       my $pbm = $pdf;
+       $pbm =~ s/pdf$/pbm/;
+       warn "# rendering $pdf => $pbm using ghostscript\n";
+       system "gs -dNOPAUSE -dBATCH -q -r300x300 -dDEVICEWIDTHPOINTS=243 -dDEVICEHEIGHTPOINTS=155 -sDEVICE=pbmraw -sOutputFile=$pbm -f $pdf";
+}
+
 __END__
 
 #system "inkscape --file $out.print.svg  --export-pdf $out.pdf";
 __END__
 
 #system "inkscape --file $out.print.svg  --export-pdf $out.pdf";