From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: including pdf and using the entire page
Date: Sun, 4 Feb 2007 13:31:41 -0500 (EST) [thread overview]
Message-ID: <alpine.WNT.0.82.0702041322220.4000@nqvgln> (raw)
In-Reply-To: <97a06f070702040630m49c24a6es6094ad32485f8b6@mail.gmail.com>
On Sun, 4 Feb 2007, Johan Sandblom wrote:
> In my document I want to include a few published pdf files. I have
> accomplished this with
>
> \chapter{File 1}
> \copypages[file1.pdf][scale=800] % 20 pages
> \chapter{File 2}
> \copypages[file1.pdf][scale=650] % 16 pages
>
> However, the included pages obey the layout of the rest of the
> document, and even if the paper in my document could allow a larger
> scale, I cannot use it since some part of the included file falls off
> the page.
Try without any value for scale, that is just \copypages[file1.pdf].
> Is it possible to include pdf files and allow each page to use the
> entire page (possibly with room left for a page number)?
See below.
> I have tried several versions including using makeup (but that is only
> one page?), pagefigure (also only one page at a time).
Basically you need to find out the number of pages of the file and
then recursively include them one by one.
Recently, I wanted to print a collection of papers as a single pdf,
with its own table of contents etc. The trouble was that some of the
papers were printed on A4 paper and some were on letter paper. So, I
modified the copypages macro to suit my needs. There is very little
configuration options for the macro, it behaves the way I wanted it
to. Maybe, you can modify it to your needs.
\unprotect
%D Usage \copyfullpages[filename.pdf]
\def\copyfullpages
{\dodoubleempty\docopyfullpages}
\def\docopyfullpages[#1][#2]%
{\bgroup
\getfiguredimensions[#1]%
\getparameters[\??ip]
[\c!n=\noffigurepages,
\c!marking=\v!off,
\c!scale=\!!thousand,
\c!offset=\!!zeropoint,
#2]%
\dorecurse\@@ipn
{\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset]
\externalfigure
[#1]
[\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2]
\stopTEXpage
\incrementnumber[page]}
\egroup}
\protect
For page numbers, I had a separate layer, which printed on top of the
included pdfs (some pdfs were scanned images). I can send you my
module if you want.
Aditya
next prev parent reply other threads:[~2007-02-04 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-04 14:30 Johan Sandblom
2007-02-04 18:31 ` Aditya Mahajan [this message]
2007-02-04 19:06 ` Johan Sandblom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.WNT.0.82.0702041322220.4000@nqvgln \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).