|
|
| version 1.5, 2013/11/23 02:57:44 | version 3.1, 2014/09/28 04:29:18 |
|---|---|
| Line 1 | Line 1 |
| #! /usr/bin/perl -w | #! /usr/bin/perl -w |
| # $Id$ | |
| use XML::Simple; | use XML::Simple; |
| use strict; | use strict; |
| use PostScript::Simple; | use PostScript::Simple; |
| Line 12 if ( defined $xml ){ | Line 13 if ( defined $xml ){ |
| $strips = XMLin($xml, KeyAttr => {strip => 'id'}); | $strips = XMLin($xml, KeyAttr => {strip => 'id'}); |
| } | } |
| # create a new PostScript object | # create a new PostScript object; |
| my $p = new PostScript::Simple(papersize => "A5", | |
| colour => 1, | my $p = new PostScript::Simple(papersize => "A5", |
| eps => 0, | colour => 1, |
| units => "mm",); | eps => 0, |
| units => "mm"); | |
| # co-ords are horizontal, vertical. from bottom left corner. 148 x 210 | # co-ords are horizontal, vertical. from bottom left corner. 148 x 210 |
| Line 605 foreach my $stripname ( sort keys %strip | Line 607 foreach my $stripname ( sort keys %strip |
| # write the output to a file | # write the output to a file |
| $p->output("gobook.ps"); | $p->output("gobook.ps"); |
| # use ghostscript to convert to pdf ... | |
| `gs -q -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pdfwrite -sOutputFile=gobook.pdf gobook.ps`; | |
| exit 0; | exit 0; |
| sub startpage { | sub startpage { |