From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/33149 Path: news.gmane.org!not-for-mail From: "Johan Sandblom" Newsgroups: gmane.comp.tex.context Subject: Re: including pdf and using the entire page Date: Sun, 4 Feb 2007 20:06:02 +0100 Message-ID: <97a06f070702041106y1628d5a8te1e875fffe98dd83@mail.gmail.com> 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 1170615989 6818 80.91.229.12 (4 Feb 2007 19:06:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2007 19:06:29 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 04 20:06:18 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 1HDmgr-0005DE-59 for gctc-ntg-context-518@m.gmane.org; Sun, 04 Feb 2007 20:06:17 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CE96A0; Sun, 4 Feb 2007 20:05:30 +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 27069-03; Sun, 4 Feb 2007 20:05:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6F41292; Sun, 4 Feb 2007 20:05:24 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DB51492 for ; Sun, 4 Feb 2007 20:05:22 +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 27216-03 for ; Sun, 4 Feb 2007 20:05:18 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by ronja.ntg.nl (Postfix) with ESMTP id 893C85C for ; Sun, 4 Feb 2007 20:05:18 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id k27so1583800nfc for ; Sun, 04 Feb 2007 11:06:03 -0800 (PST) Original-Received: by 10.49.41.3 with SMTP id t3mr1277101nfj.1170615962987; Sun, 04 Feb 2007 11:06:02 -0800 (PST) Original-Received: by 10.49.75.16 with HTTP; Sun, 4 Feb 2007 11:06:02 -0800 (PST) In-Reply-To: Content-Disposition: inline X-Google-Sender-Auth: be290b38c8c1cf67 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:33149 Archived-At: Thank you, now I have something to play with! And yes, please, I would very much like to look at you module. Johan 2007/2/4, Aditya Mahajan : > 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 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden "What is wanted is not the will to believe, but the will to find out, which is the exact opposite" - Bertrand Russell