blob: 92abe33ee3bebc4b69100739ccf3eb797e4dff70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Run qw(run);
my ($in, $out);
$in .= "\\relax\n";
open(FORMAT, '<', 'format.tex');
while (my $line = <FORMAT>){
$in .= $line;
}
close(FORMAT);
$in .= "bruh\n";
$in .= "\\bye\n";
run ['/usr/bin/pdftex'], '<', \$in, '>', \$out;
print "Content-type: application/pdf\n\n";
open(DOC, '<', 'texput.pdf');
while (<DOC>){
print;
}
|