From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33147 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: including pdf and using the entire page Date: Sun, 4 Feb 2007 13:31:41 -0500 (EST) Message-ID: References: <97a06f070702040630m49c24a6es6094ad32485f8b6@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170613930 32752 80.91.229.12 (4 Feb 2007 18:32:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2007 18:32:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 04 19:31:56 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HDm9b-0004vX-Vk for gctc-ntg-context-518@m.gmane.org; Sun, 04 Feb 2007 19:31:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 675D665; Sun, 4 Feb 2007 19:31:11 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22877-03; Sun, 4 Feb 2007 19:31:05 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F3D9078; Sun, 4 Feb 2007 19:31:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 048FE78 for ; Sun, 4 Feb 2007 19:31:03 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23354-02-8 for ; Sun, 4 Feb 2007 19:30:57 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with ESMTP id 51CBF65 for ; Sun, 4 Feb 2007 19:30:57 +0100 (CET) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY hackers.mr.itd.umich.edu ID 45C6268D.3943A.3178 ; 4 Feb 2007 13:31:41 -0500 In-Reply-To: <97a06f070702040630m49c24a6es6094ad32485f8b6@mail.gmail.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:33147 Archived-At: 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