summaryrefslogtreecommitdiff
path: root/bin/ink1-ifyllning.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ink1-ifyllning.pl')
-rwxr-xr-xbin/ink1-ifyllning.pl51
1 files changed, 51 insertions, 0 deletions
diff --git a/bin/ink1-ifyllning.pl b/bin/ink1-ifyllning.pl
new file mode 100755
index 0000000..a5f7fb0
--- /dev/null
+++ b/bin/ink1-ifyllning.pl
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use GD::SVG;
+
+open FILE, $ARGV[0] or die $!;
+my %values;
+my ($key, $value);
+while (my $line = <FILE>) {
+ chomp($line);
+ ($key, $value) = $line =~ /^(.*): *(.*)/g;
+ $values{$key} = $value;
+}
+close FILE;
+
+my $ink1_1 = GD::SVG::Image->new(792, 1122);
+my $ink1_2 = GD::SVG::Image->new(792, 1122);
+
+my $ink1_1_white = $ink1_1->colorAllocate(255,255,255);
+my $ink1_1_black = $ink1_1->colorAllocate(0,0,0);
+my $ink1_2_white = $ink1_2->colorAllocate(255,255,255);
+my $ink1_2_black = $ink1_2->colorAllocate(0,0,0);
+my $font = gdLargeFont;
+
+$ink1_1->startGroup('ink1-1');
+$ink1_1->rectangle(0,0,792,1122, $ink1_1_white);
+
+$ink1_1->string($font, 688, 432, $values{'p7_4'}, $ink1_1_black);
+
+$ink1_1->endGroup;
+
+$ink1_2->startGroup('ink1-2');
+$ink1_2->rectangle(0,0,792,1122, $ink1_2_white);
+
+print "Before\n";
+$ink1_2->string($font, 212, 124, $values{'p10_1'}, $ink1_2_black);
+print "After\n";
+
+# 266 is too far left, 280 is too far right.
+my $contact_column = 273;
+$ink1_2->string($font, $contact_column, 984, $values{'email'}, $ink1_2_black);
+$ink1_2->string($font, $contact_column+356, 984, $values{'phone'}, $ink1_2_black);
+
+$ink1_1->endGroup;
+
+open(SVGFILE, ">ink1_1-overlay.svg");
+print SVGFILE $ink1_1->svg;
+open(SVGFILE, ">ink1_2-overlay.svg");
+print SVGFILE $ink1_2->svg;