1# -*- mode: Perl -*-
2# /=====================================================================\ #
3# |  pdfpages                                                           | #
4# | Implementation for LaTeXML                                          | #
5# |=====================================================================| #
6# | Part of LaTeXML:                                                    | #
7# |  Public domain software, produced as part of work done by the       | #
8# |  United States Government & not subject to copyright in the US.     | #
9# |---------------------------------------------------------------------| #
10# | Bruce Miller <bruce.miller@nist.gov>                        #_#     | #
11# | http://dlmf.nist.gov/LaTeXML/                              (o o)    | #
12# \=========================================================ooo==U==ooo=/ #
13package LaTeXML::Package::Pool;
14use strict;
15use warnings;
16use LaTeXML::Package;
17
18#================================================================================
19# Includes a pdf into the output, possibly a subset of pages from the pdf.
20# Two options here
21#  (1) convert the page(s) to image(s)
22#      This might make sense for a single page, smallish image?
23#  (2) copy the pdf as a resource and link to it.
24#      We'll take this approach for now
25DefConstructor('\includepdf OptionalKeyVals{}',
26  "<ltx:resource src='#src' type='application/pdf'/>"
27    . "See #pages<ltx:ref href='#src'>#src</ltx:ref>",
28  properties => sub {
29    my $pages = GetKeyVal($_[1], 'pages');
30    (src => $_[2],
31      pages => ($pages ? "pages " . ToString($pages) . " of " : undef)); });
32
33#================================================================================
34
351;
36