From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65790 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: including pdf Date: Wed, 2 Feb 2011 11:37:47 -0500 (EST) Message-ID: References: <15E9F111-A7A0-448E-A847-4B8C5A18521B@di.unito.it> <968679B4-77CB-47E1-81D9-18F52B223AEA@di.unito.it> <31985C85-0946-4226-B9A3-143906FEF9B3@gmail.com> <0591EEE8-0386-4DA9-93E1-EFCAD012B3F5@di.unito.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296664698 13379 80.91.229.12 (2 Feb 2011 16:38:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Feb 2011 16:38:18 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 02 17:38:14 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pkfif-0002Sn-OV for gctc-ntg-context-518@m.gmane.org; Wed, 02 Feb 2011 17:38:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A4D16CAA96; Wed, 2 Feb 2011 17:38:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id A9ZtuyUuFFrK; Wed, 2 Feb 2011 17:38:06 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 96065CAA90; Wed, 2 Feb 2011 17:38:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7AE69CAA90 for ; Wed, 2 Feb 2011 17:38:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p+1f7fRbpphn for ; Wed, 2 Feb 2011 17:37:53 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 07312CAA8E for ; Wed, 2 Feb 2011 17:37:53 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p12Gbp95028903 for ; Wed, 2 Feb 2011 17:37:52 +0100 Original-Received: FROM adi-netbook (Unknown [65.94.14.230]) By hackers.mr.itd.umich.edu ID 4D49885D.50014.17264 ; Authuser adityam; 2 Feb 2011 11:37:49 EST In-Reply-To: <0591EEE8-0386-4DA9-93E1-EFCAD012B3F5@di.unito.it> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cE34BPP6 - 5b812dc93bf5 - 20110202 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:65790 Archived-At: On Wed, 2 Feb 2011, Andrea Valle wrote: > Ok, let's reformulate partially > > If I have: > > \setuppapersize[A4] > > \setuppagenumbering[location=left, state=start] > > \starttext > > \copypages[pdf/Test.pdf][scale=1000] > > \stoptext > > Looking at the resulting pdf, it seems that the original pdf is mirrored > (apart from half a line at the bottom of the paper, trunked). > Ok. But there are not page numbers (I guess they are coverd by the imported > pdf) You can add a layer on top and set page numbers in the layer. > Now, so sum up my problem is: > - given a certain number of A4 pdf > - how to collect them in a unique pdf > - with successive page numbers > - and with refs, so that I can automagically create a TOC For a quick solution, you can try the cut-n-paste module[1]. It does not create a TOC, so you will have to do that by hand (or a helper macro). \usemodule[cut-n-paste] \newcount\colledpages \definecutNpaste[collection][n=1,text={\setups[page]},location=(OverlayWidth/2,1cm)] \startsetups[page] \doglobal\increment{\collectedpages}% \collectedpages \stopsetups \starttext \processcollection[name=paper1.pdf] \processcollection[name=paper2.pdf] \processcollection[name=paper3.pdf] \stoptext The location of the text is controled by the location key. This can be any valid metapost coordinate. The module is actually meant for convert two column pdfs to one column pdfs (for reading on an ebook device), so it an overkill for just merging pages. You can however control how many pages to insert, (using start and stop keys), and draw a grid on the page (grid=yes), and trim the page (more complicated). But, as I said earlier, the simplest way is to just insert the page number in a layer. Aditya [1]:https://github.com/adityam/cut-n-paste ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________