X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=inkscape-render.pl;h=9df63e43dde23998b10bbf8fb8276a0ce9824a2f;hb=f3c09fd7ef64c13af90056e03ae868f1e106ff14;hp=b8e73603ac88854a68232de54cb305942e8380f2;hpb=9acacee0673b1e7e02421d7adf038c62cc3b2272;p=Printer-EVOLIS.git diff --git a/inkscape-render.pl b/inkscape-render.pl index b8e7360..9df63e4 100755 --- a/inkscape-render.pl +++ b/inkscape-render.pl @@ -68,6 +68,15 @@ print $inkscape "$out.svg --export-png $out.png --export-dpi 300\n"; 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"; +} + +system "pdftk $out.print-front.pdf $out.print-back.pdf cat output $out.print-duplex.pdf"; + __END__ #system "inkscape --file $out.print.svg --export-pdf $out.pdf";