File: minimal.pl

package info (click to toggle)
libpostscript-file-perl 1.05-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 216 kB
  • ctags: 84
  • sloc: perl: 2,037; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /usr/bin/perl
#---------------------------------------------------------------------
# This example is hereby placed in the public domain.
# You may copy from it freely.
#
# This is a minimal Hello, World for PostScript::File.
#---------------------------------------------------------------------

use strict;
use warnings;

use PostScript::File;

my $ps = PostScript::File->new();

$ps->add_to_page( <<END_PAGE );
    /Helvetica findfont
    12 scalefont
    setfont
    72 300 moveto
    (hello world) show
END_PAGE

printf "Wrote %s...\n", $ps->output("minimal", $ENV{TMP});