Skip to content

Instantly share code, notes, and snippets.

@jasonblewis
Last active July 23, 2019 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonblewis/4027daf0f6bc71419bd17f60c94876a4 to your computer and use it in GitHub Desktop.
Save jasonblewis/4027daf0f6bc71419bd17f60c94876a4 to your computer and use it in GitHub Desktop.
include image
#!/usr/bin/env perl
use Template;
my $DEBUG = 9;
my $tt = Template->new({
INCLUDE_PATH => './',
OUTPUT_PATH => './',
});
my $vars = {
title => 'Hello World',
};
#$tt->process('casual-contract.tt2', $vars, 'casual-contract.pdf', binmode => 1) || die $tt->error();
$tt->process('tttest.tt2', $vars, 'tttest.pdf', binmode => 1) || die $tt->error();
[%- USE Latex;
FILTER latex("pdf"); -%]
\documentclass{article}
\usepackage{wallpaper}
\begin{document}
\ThisCenterWallPaper{0.25}{test.png}
This is a PDF document generated by
LaTeX and the Template Toolkit, with some
\end{document}
[% END; -%]
@jasonblewis
Copy link
Author

$ ./build.pl 
latex error - xelatex exited with errors:
! Unable to load picture or PDF file 'test.png'.
l.9 \end{document}
! Package graphics Error: Division by 0.
l.9 \end{document}
! Package graphics Error: Division by 0.
l.9 \end{document}
! Unable to load picture or PDF file 'test.png'.
l.9 \end{document}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment